summaryrefslogtreecommitdiff
path: root/src/devices
diff options
context:
space:
mode:
authorwlemb <wlemb>2003-02-17 20:37:08 +0000
committerwlemb <wlemb>2003-02-17 20:37:08 +0000
commitdd41e31bc5e4d53896180070a6dff88b0f4a06ad (patch)
tree425681d64830b6bad0d2055a5d911c13ec8266b5 /src/devices
parentcb5c9fa2e9b072eafd936a516564930a37270654 (diff)
downloadgroff-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/devices')
-rw-r--r--src/devices/grotty/tty.cc16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/devices/grotty/tty.cc b/src/devices/grotty/tty.cc
index 984ed6ca..bfb8a207 100644
--- a/src/devices/grotty/tty.cc
+++ b/src/devices/grotty/tty.cc
@@ -530,13 +530,15 @@ void tty_printer::put_color(char color_index, int back)
back = !back;
color_index = back ? curr_back_idx : curr_fore_idx;
}
- putstring(CSI);
- if (back)
- putchar('4');
- else
- putchar('3');
- putchar(color_index + '0');
- putchar('m');
+ if (color_index != DEFAULT_COLOR_IDX) {
+ putstring(CSI);
+ if (back)
+ putchar('4');
+ else
+ putchar('3');
+ putchar(color_index + '0');
+ putchar('m');
+ }
}
void tty_printer::end_page(int page_length)