From fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Wed, 8 Jul 2015 20:46:52 -0400 Subject: Initial commit --- pkg/system/help/lroff/nofill.x | 45 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 pkg/system/help/lroff/nofill.x (limited to 'pkg/system/help/lroff/nofill.x') diff --git a/pkg/system/help/lroff/nofill.x b/pkg/system/help/lroff/nofill.x new file mode 100644 index 00000000..f81b0d88 --- /dev/null +++ b/pkg/system/help/lroff/nofill.x @@ -0,0 +1,45 @@ +# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc. + +include "lroff.h" + +.help nofill +.nf __________________________________________________________________________ +NOFILL -- Copy a block of text in ".nf" (nofill) mode, leaving the text +alone except for left justification. The only directives recognized in +a nofill block are FI (resume filling) and RJ (right justify). +.endhelp _____________________________________________________________________ + +int procedure nofill (in, out, linebuf) + +extern in(), out() +char linebuf[ARB] +int ip, command +pointer sp, rjbuf +int in(), input(), nextcmd() +errchk salloc, breakline, input, rjline, outline +include "lroff.com" + +begin + call smark (sp) + call salloc (rjbuf, SZ_IBUF, TY_CHAR) + + call breakline (out, NJ) + + while (input (in, linebuf) != EOF) { + command = nextcmd (linebuf, ip) + switch (command) { + case FI, ENDHELP: + call sfree (sp) + return (command) + case RJ: # right justify text + if (input (in, Memc[rjbuf]) == EOF) + break + call rjline (out, Memc[rjbuf], linebuf[ip]) + default: + call outline (out, linebuf) + } + } + + call sfree (sp) + return (ENDHELP) +end -- cgit