diff options
author | Bruno Haible <bruno@clisp.org> | 2006-12-19 20:17:26 +0000 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2009-06-23 12:14:32 +0200 |
commit | 35232400b0930e39da7a24e3219b4b7eda3733f7 (patch) | |
tree | b283dc3fbed462d97dd5504ce84f9a714b38660c /gnulib-local | |
parent | 0bddedcc1179f3673f35a51a5f0cf8d00f7346d4 (diff) | |
download | external_gettext-35232400b0930e39da7a24e3219b4b7eda3733f7.zip external_gettext-35232400b0930e39da7a24e3219b4b7eda3733f7.tar.gz external_gettext-35232400b0930e39da7a24e3219b4b7eda3733f7.tar.bz2 |
Improve support of xterm on deficient platforms.
Diffstat (limited to 'gnulib-local')
-rw-r--r-- | gnulib-local/ChangeLog | 5 | ||||
-rw-r--r-- | gnulib-local/lib/term-ostream.oo.c | 13 |
2 files changed, 18 insertions, 0 deletions
diff --git a/gnulib-local/ChangeLog b/gnulib-local/ChangeLog index e556282..d26df75 100644 --- a/gnulib-local/ChangeLog +++ b/gnulib-local/ChangeLog @@ -1,5 +1,10 @@ 2006-12-19 Bruno Haible <bruno@clisp.org> + * lib/term-ostream.oo.c (term_ostream_create): Add color information + about xterm if the platform lacks it. + +2006-12-19 Bruno Haible <bruno@clisp.org> + * lib/term-ostream.oo.c: Include terminfo.h instead of termcap.h. * modules/term-ostream (Depends-on): Add terminfo-h, remove termcap-h. diff --git a/gnulib-local/lib/term-ostream.oo.c b/gnulib-local/lib/term-ostream.oo.c index 657a479..d731ed0 100644 --- a/gnulib-local/lib/term-ostream.oo.c +++ b/gnulib-local/lib/term-ostream.oo.c @@ -1787,6 +1787,19 @@ term_ostream_create (int fd, const char *filename) abort (); } #endif + + /* AIX 4.3.2, IRIX 6.5, HP-UX 11, Solaris 7..10 all lack the + description of color capabilities of "xterm" and "xterms" + in their terminfo database. But it is important to have + color in xterm. So we provide the color capabilities here. */ + if (stream->max_colors <= 1 + && (strcmp (term, "xterm") == 0 || strcmp (term, "xterms") == 0)) + { + stream->max_colors = 8; + stream->set_a_foreground = xstrdup ("\033[3%p1%dm"); + stream->set_a_background = xstrdup ("\033[4%p1%dm"); + stream->orig_pair = xstrdup ("\033[39;49m"); + } } /* Infer the capabilities. */ |