diff options
author | Bruno Haible <bruno@clisp.org> | 2006-12-12 14:17:15 +0000 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2009-06-23 12:14:27 +0200 |
commit | 98e5477bbf520138d06f1a3628c8dc5e97ab81fe (patch) | |
tree | a42d870daa6efba81b98504b4ff5884beffaf369 | |
parent | 7855a59545c6ff5e44c3124295b06170f53367e3 (diff) | |
download | external_gettext-98e5477bbf520138d06f1a3628c8dc5e97ab81fe.zip external_gettext-98e5477bbf520138d06f1a3628c8dc5e97ab81fe.tar.gz external_gettext-98e5477bbf520138d06f1a3628c8dc5e97ab81fe.tar.bz2 |
Make it work on BeOS.
-rw-r--r-- | gnulib-local/ChangeLog | 6 | ||||
-rw-r--r-- | gnulib-local/lib/term-ostream.oo.c | 18 |
2 files changed, 24 insertions, 0 deletions
diff --git a/gnulib-local/ChangeLog b/gnulib-local/ChangeLog index 2b6a92e..beed6de 100644 --- a/gnulib-local/ChangeLog +++ b/gnulib-local/ChangeLog @@ -1,5 +1,11 @@ 2006-12-11 Bruno Haible <bruno@clisp.org> + Portability to BeOS. + * lib/term-ostream.oo.c (term_ostream_create) [BeOS]: Correct the + values of stream->set_a_foreground and stream->set_a_background. + +2006-12-11 Bruno Haible <bruno@clisp.org> + Portability to systems with GNU termcap. * m4/termcap.m4 (gl_TERMCAP_BODY): Also test for the tparam function. * lib/termcap.h (tparam): New declaration. diff --git a/gnulib-local/lib/term-ostream.oo.c b/gnulib-local/lib/term-ostream.oo.c index 6d1d469..e919cbe 100644 --- a/gnulib-local/lib/term-ostream.oo.c +++ b/gnulib-local/lib/term-ostream.oo.c @@ -1717,6 +1717,24 @@ term_ostream_create (int fd, const char *filename) stream->enter_underline_mode = xstrdup0 (tgetstr ("us", NULL)); stream->exit_underline_mode = xstrdup0 (tgetstr ("ue", NULL)); stream->exit_attribute_mode = xstrdup0 (tgetstr ("me", NULL)); + +#ifdef __BEOS__ + /* The BeOS termcap entry for "beterm" is broken: For "AF" and "AB" it + contains balues in terminfo syntax but the system's tparam() function + understands only the termcap syntax. */ + if (stream->set_a_foreground != NULL + && strcmp (stream->set_a_foreground, "\033[3%p1%dm") == 0) + { + free (stream->set_a_foreground); + stream->set_a_foreground = xstrdup ("\033[3%dm"); + } + if (stream->set_a_background != NULL + && strcmp (stream->set_a_background, "\033[4%p1%dm") == 0) + { + free (stream->set_a_background); + stream->set_a_background = xstrdup ("\033[4%dm"); + } +#endif } /* Infer the capabilities. */ |