]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Make it work on BeOS.
authorBruno Haible <bruno@clisp.org>
Tue, 12 Dec 2006 14:17:15 +0000 (14:17 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:14:27 +0000 (12:14 +0200)
gnulib-local/ChangeLog
gnulib-local/lib/term-ostream.oo.c

index 2b6a92e1905a6d717cd519dbaf1de83669de8435..beed6dedcc63600ec43c0a181e139cd7d97d5c21 100644 (file)
@@ -1,3 +1,9 @@
+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.
index 6d1d469a3f263b509743beb5e116f4558729f988..e919cbe47350aedcded54a45df5a01e9818b6c65 100644 (file)
@@ -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.  */