diff options
-rw-r--r-- | ChangeLog | 14 | ||||
-rw-r--r-- | PROBLEMS | 10 | ||||
-rw-r--r-- | src/devices/grotty/tty.cc | 24 | ||||
-rw-r--r-- | src/roff/troff/div.h | 3 | ||||
-rw-r--r-- | src/roff/troff/env.h | 1 | ||||
-rw-r--r-- | src/roff/troff/input.cc | 1 | ||||
-rw-r--r-- | src/roff/troff/node.cc | 16 |
7 files changed, 51 insertions, 18 deletions
@@ -7,6 +7,20 @@ Remove `-Wall'. * NEWS, src/roff/nroff/nroff.man: Updated. + * PROBLEMS: Document bison 1.32 bug. + + Some fixes to make groff compile on z/OS 1.2 UNIX (was OS/390). + + * src/roff/troff/node.cc (make_tfont): Define it earlier. + * src/roff/troff/div.h: Add prototype for `end_diversions'. + * src/roff/troff/input.cc: Add prototype for `process_input_stack'. + * src/roff/troff/env.h: Add prototype for `title'. + + Adding EBCDIC support to grotty. + + * src/devices/grotty/tty.cc (CSI): New macro. + (SGR_*, tty_printer::put_color): Use it. + 2002-02-06 Werner LEMBERG <wl@gnu.org> Implementing color support in grotty. The new switch -c activates @@ -608,6 +608,16 @@ Compilation Problems +* Compilation dies with + + y.tab.c: In function `int yyparse()': + y.tab.c: `size_t' undeclared in namespace `std' + +This is a bug in bison 1.32. Don't use this version. 1.28 or 1.33 works +fine. Alternatively, use yacc or byacc. + +---------------------------------------------------------------------- + * There are many empty `Makefile.dep' files. Is this a bug? No. Real dependency files are created with a `make depend' call. diff --git a/src/devices/grotty/tty.cc b/src/devices/grotty/tty.cc index 674e6051..cb791ea5 100644 --- a/src/devices/grotty/tty.cc +++ b/src/devices/grotty/tty.cc @@ -56,15 +56,21 @@ enum { // Mode to use for bold-underlining. static unsigned char bold_underline_mode = BOLD_MODE|UNDERLINE_MODE; +#ifndef IS_EBCDIC_HOST +#define CSI "\033[" +#else +#define CSI "\047[" +#endif + // SGR handling (ISO 6429) -#define SGR_BOLD "\033[1m" -#define SGR_NO_BOLD "\033[22m" -#define SGR_ITALIC "\033[3m" -#define SGR_NO_ITALIC "\033[23m" -#define SGR_UNDERLINE "\033[4m" -#define SGR_NO_UNDERLINE "\033[24m" -#define SGR_DEFAULT_COLOR "\033[39m" -#define SGR_BACK_DEFAULT_COLOR "\033[49m" +#define SGR_BOLD CSI "1m" +#define SGR_NO_BOLD CSI "22m" +#define SGR_ITALIC CSI "3m" +#define SGR_NO_ITALIC CSI "23m" +#define SGR_UNDERLINE CSI "4m" +#define SGR_NO_UNDERLINE CSI "24m" +#define SGR_DEFAULT_COLOR CSI "39m" +#define SGR_BACK_DEFAULT_COLOR CSI "49m" #define TTY_MAX_COLORS 8 #define DEFAULT_COLOR_IDX TTY_MAX_COLORS @@ -425,7 +431,7 @@ void tty_printer::put_color(unsigned char color_index, int back) { if (color_index == DEFAULT_COLOR_IDX) color_index = 9; - putstring("\033["); + putstring(CSI); if (back) putchar('4'); else diff --git a/src/roff/troff/div.h b/src/roff/troff/div.h index 37ec3fa6..31b9af3c 100644 --- a/src/roff/troff/div.h +++ b/src/roff/troff/div.h @@ -152,6 +152,7 @@ void push_page_ejector(); void continue_page_eject(); void handle_first_page_transition(); void blank_line(); -void begin_page(void); +void begin_page(); +void end_diversions(); extern void cleanup_and_exit(int); diff --git a/src/roff/troff/env.h b/src/roff/troff/env.h index 215c4172..b940e1ec 100644 --- a/src/roff/troff/env.h +++ b/src/roff/troff/env.h @@ -354,6 +354,7 @@ extern void push_env(int); void init_environments(); void read_hyphen_file(const char *name); +void title(); extern int break_flag; extern symbol default_family; diff --git a/src/roff/troff/input.cc b/src/roff/troff/input.cc index 56aa1345..087c6795 100644 --- a/src/roff/troff/input.cc +++ b/src/roff/troff/input.cc @@ -88,6 +88,7 @@ void vjustify(); #endif /* COLUMN */ void transparent(); void transparent_file(); +void process_input_stack(); const char *program_name = 0; token tok; diff --git a/src/roff/troff/node.cc b/src/roff/troff/node.cc index 159104bd..32efcb0d 100644 --- a/src/roff/troff/node.cc +++ b/src/roff/troff/node.cc @@ -237,6 +237,14 @@ inline int font_info::is_style() return fm == 0; } +tfont *make_tfont(tfont_spec &spec) +{ + for (tfont *p = tfont::tfont_list; p; p = p->next) + if (*p == spec) + return p; + return new tfont(spec); +} + // this is the current_font, fontno is where we found the character, // presumably a special font @@ -638,14 +646,6 @@ inline int tfont::get_kern(charinfo *c1, charinfo *c2, hunits *res) } } -tfont *make_tfont(tfont_spec &spec) -{ - for (tfont *p = tfont::tfont_list; p; p = p->next) - if (*p == spec) - return p; - return new tfont(spec); -} - tfont *tfont::tfont_list = 0; tfont::tfont(tfont_spec &spec) : tfont_spec(spec) |