summaryrefslogtreecommitdiff
path: root/libtextstyle
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2022-01-30 18:46:21 +0100
committerBruno Haible <bruno@clisp.org>2022-01-30 18:46:21 +0100
commit4494fc03aebb06c672972abb77745e1e9540842d (patch)
tree1e57cd727b1b82b8429a82344ff64bd9b5c398bd /libtextstyle
parent8d8d47094360a368834ffd3ea5ba6e8d8eb7c1e1 (diff)
downloadgettext-4494fc03aebb06c672972abb77745e1e9540842d.tar.gz
libtextstyle: Consider setupterm return code.
* libtextstyle/gnulib-local/lib/term-ostream.oo.c (term_ostream_create): Don't bother retrieving values if $TERM is an unknown terminal type.
Diffstat (limited to 'libtextstyle')
-rw-r--r--libtextstyle/gnulib-local/lib/term-ostream.oo.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libtextstyle/gnulib-local/lib/term-ostream.oo.c b/libtextstyle/gnulib-local/lib/term-ostream.oo.c
index dfd191046..38490e476 100644
--- a/libtextstyle/gnulib-local/lib/term-ostream.oo.c
+++ b/libtextstyle/gnulib-local/lib/term-ostream.oo.c
@@ -2501,7 +2501,7 @@ term_ostream_create (int fd, const char *filename, ttyctl_t tty_control)
#if HAVE_TERMINFO
int err = 1;
- if (setupterm (term, fd, &err) || err == 1)
+ if (setupterm (term, fd, &err) == 0 || err == 1)
{
/* Retrieve particular values depending on the terminal type. */
stream->max_colors = tigetnum ("colors");