diff options
author | abial <abial@FreeBSD.org> | 1998-12-22 11:46:27 +0000 |
---|---|---|
committer | abial <abial@FreeBSD.org> | 1998-12-22 11:46:27 +0000 |
commit | 866889d2368a75421dcb784f000e5ef29afa1f93 (patch) | |
tree | 1bb77b63d04f1230e7696d1895eb170841832a7d | |
parent | 524f060924f0e318250a13b7ea8041e649bdcce6 (diff) | |
download | FreeBSD-src-866889d2368a75421dcb784f000e5ef29afa1f93.zip FreeBSD-src-866889d2368a75421dcb784f000e5ef29afa1f93.tar.gz |
Add new word ".#" which acts like "." but doesn't output a space separator.
I found it impossible to output parametrized strings like "\033[%d;%dH"
without building them first in pad area.
-rw-r--r-- | sys/boot/ficl/words.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/sys/boot/ficl/words.c b/sys/boot/ficl/words.c index b92d691..da9112b 100644 --- a/sys/boot/ficl/words.c +++ b/sys/boot/ficl/words.c @@ -622,6 +622,18 @@ static void displayCell(FICL_VM *pVM) return; } +static void displayCellNoPad(FICL_VM *pVM) +{ + CELL c; +#if FICL_ROBUST > 1 + vmCheckStack(pVM, 1, 0); +#endif + c = stackPop(pVM->pStack); + ltoa((c).i, pVM->pad, pVM->base); + vmTextOut(pVM, pVM->pad, 0); + return; +} + static void uDot(FICL_VM *pVM) { UNS32 u; @@ -4158,6 +4170,7 @@ void ficlCompileCore(FICL_DICT *dp) dictAppendWord(dp, ",", comma, FW_DEFAULT); dictAppendWord(dp, "-", sub, FW_DEFAULT); dictAppendWord(dp, ".", displayCell, FW_DEFAULT); + dictAppendWord(dp, ".#", displayCellNoPad, FW_DEFAULT); dictAppendWord(dp, ".\"", dotQuoteCoIm, FW_COMPIMMED); dictAppendWord(dp, "/", ficlDiv, FW_DEFAULT); dictAppendWord(dp, "/mod", slashMod, FW_DEFAULT); |