diff options
author | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
commit | e0c6872cf40896c7be36b11dcc744620f10adf1d (patch) | |
tree | 60335e10d2f4354b0674ec22d7b53f0f8abee672 /dviware/quicspool/src/quic.l |
Initial commit
Diffstat (limited to 'dviware/quicspool/src/quic.l')
-rw-r--r-- | dviware/quicspool/src/quic.l | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/dviware/quicspool/src/quic.l b/dviware/quicspool/src/quic.l new file mode 100644 index 0000000000..36d1709669 --- /dev/null +++ b/dviware/quicspool/src/quic.l @@ -0,0 +1,60 @@ +/* $Header: quic.l,v 1.1 88/01/15 13:05:21 simpson Rel $ */ +%{ +/* +$Log: quic.l,v $ + * Revision 1.1 88/01/15 13:05:21 simpson + * initial release + * + * Revision 0.1 87/12/11 21:37:40 simpson + * beta test + * +*/ +/* Scans the data going by the "if" filter */ +%} +%% +\^P[YN]\^- { + QuicMode = (yytext[2] == 'Y' ? TRUE : FALSE); + if (QuicMode) + EnteredQuic = TRUE; + fputs(yytext, stdout); + } +\^[OF] { + if (QuicMode) + FreeForm = (yytext[1] == 'F' ? TRUE : FALSE); + fputs(yytext, stdout); + } +"^," { + if (QuicMode) { + NumPages++; + if (!Raw) + LineNum = 1; + } + fputs(yytext, stdout); + } +\f { + if (!QuicMode || (QuicMode && !FreeForm)) + NumPages++; + fputs(yytext, stdout); + } +\n { + if (!Raw) { + putchar('\r'); + if (++LineNum > Length) { + NumPages++; + LineNum -= Length; + } + CharCount = 1; + } + fputs(yytext, stdout); + } +. { + short i; + + if (!Raw) { + if (CharCount++ == 1 && Indent > 0) + for (i = 0; i < Indent; i++) + putchar(' '); + } + fputs(yytext, stdout); + } +%% |