diff options
author | Matthieu Herrb <matthieu@openbsd.org> | 2009-08-02 20:47:35 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu@openbsd.org> | 2009-08-02 20:47:35 +0000 |
commit | e4bb08e1f5ebf47620758795efcbdd61849b73e8 (patch) | |
tree | e0e450d5a734188b3614ebc9b37bbcdfe24164fc | |
parent | 5db47ed53a15882e9264a059ec027bc4f5acf5b7 (diff) | |
download | rtmux-e4bb08e1f5ebf47620758795efcbdd61849b73e8.tar.gz rtmux-e4bb08e1f5ebf47620758795efcbdd61849b73e8.tar.bz2 rtmux-e4bb08e1f5ebf47620758795efcbdd61849b73e8.zip |
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 | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -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: |