diff options
author | wlemb <wlemb> | 2003-02-17 20:37:08 +0000 |
---|---|---|
committer | wlemb <wlemb> | 2003-02-17 20:37:08 +0000 |
commit | dd41e31bc5e4d53896180070a6dff88b0f4a06ad (patch) | |
tree | 425681d64830b6bad0d2055a5d911c13ec8266b5 /src/roff | |
parent | cb5c9fa2e9b072eafd936a516564930a37270654 (diff) | |
download | groff-dd41e31bc5e4d53896180070a6dff88b0f4a06ad.tar.gz |
Another round trying to really fix problems with `have_input'.
* src/roff/troff/input.cc (input_stack::get): Handle `have_input'.
(token::next) <'\n'>, <\'\n'>: Don't handle `have_input'.
* src/devices/grotty/tty.cc (tty_printer::put_color): Fix color
handling if both foreground and background colors are default.
* doc/groff.texinfo (Debugging): Document .lf differences to
AT&T troff.
Diffstat (limited to 'src/roff')
-rw-r--r-- | src/roff/troff/input.cc | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/roff/troff/input.cc b/src/roff/troff/input.cc index 3ad7ac80..a40ede8c 100644 --- a/src/roff/troff/input.cc +++ b/src/roff/troff/input.cc @@ -107,8 +107,9 @@ int suppress_output_flag = 0; int is_html = 0; int begin_level = 0; // number of nested .begin requests -int have_input = 0; // whether \f, \H, \R, \s, or \S has - // been processed in token::next() +int have_input = 0; // whether \f, \F, \D'F...', \H, \m, \M, + // \R, \s, or \S has been processed in + // token::next() int tcommand_flag = 0; int safer_flag = 1; // safer by default @@ -437,7 +438,10 @@ inline int input_stack::get_level() inline int input_stack::get(node **np) { - return (top->ptr < top->eptr) ? *top->ptr++ : finish_get(np); + int res = (top->ptr < top->eptr) ? *top->ptr++ : finish_get(np); + if (res == '\n') + have_input = 0; + return res; } int input_stack::finish_get(node **np) @@ -1680,7 +1684,6 @@ void token::next() return; case '\n': type = TOKEN_NEWLINE; - have_input = 0; return; case '\001': type = TOKEN_LEADER; @@ -2045,7 +2048,6 @@ void token::next() case '}': goto ESCAPE_RIGHT_BRACE; case '\n': - have_input = 0; break; case '[': if (!compatible_flag) { |