summaryrefslogtreecommitdiff
path: root/gnulib-local/lib/term-ostream.oo.c
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2006-12-12 14:17:15 +0000
committerBruno Haible <bruno@clisp.org>2009-06-23 12:14:27 +0200
commit98e5477bbf520138d06f1a3628c8dc5e97ab81fe (patch)
treea42d870daa6efba81b98504b4ff5884beffaf369 /gnulib-local/lib/term-ostream.oo.c
parent7855a59545c6ff5e44c3124295b06170f53367e3 (diff)
downloadgettext-98e5477bbf520138d06f1a3628c8dc5e97ab81fe.tar.gz
Make it work on BeOS.
Diffstat (limited to 'gnulib-local/lib/term-ostream.oo.c')
-rw-r--r--gnulib-local/lib/term-ostream.oo.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/gnulib-local/lib/term-ostream.oo.c b/gnulib-local/lib/term-ostream.oo.c
index 6d1d469a3..e919cbe47 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. */