diff options
author | Tiago Cunha <tcunha@gmx.com> | 2009-08-09 12:06:25 +0000 |
---|---|---|
committer | Tiago Cunha <tcunha@gmx.com> | 2009-08-09 12:06:25 +0000 |
commit | 75b6736cf45d4b7b8b4873b4ad6d0cb85e56dcfb (patch) | |
tree | b4692d0e8da6093090be8c91c705515ad4854f0a | |
parent | 80196c9abcc1c9c3f809b80a78f6636f5a5acb9d (diff) | |
download | rtmux-75b6736cf45d4b7b8b4873b4ad6d0cb85e56dcfb.tar.gz rtmux-75b6736cf45d4b7b8b4873b4ad6d0cb85e56dcfb.tar.bz2 rtmux-75b6736cf45d4b7b8b4873b4ad6d0cb85e56dcfb.zip |
Sync OpenBSD patchset 210:
Fix checking of setupterm(3) error codes. While there include the
name of the terminal type causing the error where relevant. ok nicm@.
-rw-r--r-- | tty-term.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -1,4 +1,4 @@ -/* $Id: tty-term.c,v 1.23 2009-07-14 06:54:38 nicm Exp $ */ +/* $Id: tty-term.c,v 1.24 2009-08-09 12:06:25 tcunha Exp $ */ /* * Copyright (c) 2008 Nicholas Marriott <nicm@users.sourceforge.net> @@ -186,13 +186,13 @@ tty_term_find(char *name, int fd, char **cause) /* Set up curses terminal. */ if (setupterm(name, fd, &error) != OK) { switch (error) { - case 0: - xasprintf(cause, "can't use hardcopy terminal"); - break; case 1: - xasprintf(cause, "missing or unsuitable terminal"); + xasprintf(cause, "can't use hardcopy terminal: %s", name); + break; + case 0: + xasprintf(cause, "missing or unsuitable terminal: %s", name); break; - case 2: + case -1: xasprintf(cause, "can't find terminfo database"); break; default: |