From: Bruno Haible Date: Mon, 4 Dec 2006 13:28:09 +0000 (+0000) Subject: Recognize also rxvt-16color and konsole-16color. X-Git-Tag: v0.17~612 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=30fbcc0374d83a6c451d7d126ba49a0f5025f434;p=thirdparty%2Fgettext.git Recognize also rxvt-16color and konsole-16color. --- diff --git a/gnulib-local/ChangeLog b/gnulib-local/ChangeLog index fcce7852b..b24c90bd2 100644 --- a/gnulib-local/ChangeLog +++ b/gnulib-local/ChangeLog @@ -1,3 +1,8 @@ +2006-12-02 Bruno Haible + + * lib/term-ostream.oo.c (term_ostream_create): Recognize also the + terminal types rxvt[-16color] and konsole[-16color]. + 2006-12-01 Bruno Haible Preserve the hue of bright colors. diff --git a/gnulib-local/lib/term-ostream.oo.c b/gnulib-local/lib/term-ostream.oo.c index 1f1efbeeb..09cfc9bc4 100644 --- a/gnulib-local/lib/term-ostream.oo.c +++ b/gnulib-local/lib/term-ostream.oo.c @@ -1768,7 +1768,13 @@ term_ostream_create (int fd, const char *filename) && stream->orig_pair != NULL); stream->colormodel = (stream->supports_foreground || stream->supports_background - ? (term != NULL && strlen (term) >= 5 && memcmp (term, "xterm", 5) == 0 + ? (term != NULL + && (/* Recognize xterm-16color, xterm-88color, xterm-256color. */ + (strlen (term) >= 5 && memcmp (term, "xterm", 5) == 0) + || /* Recognize rxvt-16color. */ + (strlen (term) >= 4 && memcmp (term, "rxvt", 7) == 0) + || /* Recognize konsole-16color. */ + (strlen (term) >= 7 && memcmp (term, "konsole", 7) == 0)) ? (stream->max_colors == 256 ? cm_xterm256 : stream->max_colors == 88 ? cm_xterm88 : stream->max_colors == 16 ? cm_xterm16 :