From 624b9567c70976766065c826b73234925b052595 Mon Sep 17 00:00:00 2001 From: nicm Date: Fri, 28 Apr 2023 05:59:35 +0000 Subject: [PATCH 4/4] Do not fatal if tparm fails, instead just log it (not working sequences are better than exiting). --- tty-term.c | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) --- a/tty-term.c +++ b/tty-term.c @@ -771,8 +771,10 @@ #else s = tparm((char *)x, a, 0, 0, 0, 0, 0, 0, 0, 0); #endif - if (s == NULL) - fatalx("could not expand %s", tty_term_codes[code].name); + if (s == NULL) { + log_debug("could not expand %s", tty_term_codes[code].name); + return (""); + } return (s); } @@ -788,8 +790,10 @@ #else s = tparm((char *)x, a, b, 0, 0, 0, 0, 0, 0, 0); #endif - if (s == NULL) - fatalx("could not expand %s", tty_term_codes[code].name); + if (s == NULL) { + log_debug("could not expand %s", tty_term_codes[code].name); + return (""); + } return (s); } @@ -806,8 +810,10 @@ #else s = tparm((char *)x, a, b, c, 0, 0, 0, 0, 0, 0); #endif - if (s == NULL) - fatalx("could not expand %s", tty_term_codes[code].name); + if (s == NULL) { + log_debug("could not expand %s", tty_term_codes[code].name); + return (""); + } return (s); } @@ -823,8 +829,10 @@ #else s = tparm((char *)x, (long)a, 0, 0, 0, 0, 0, 0, 0, 0); #endif - if (s == NULL) - fatalx("could not expand %s", tty_term_codes[code].name); + if (s == NULL) { + log_debug("could not expand %s", tty_term_codes[code].name); + return (""); + } return (s); } @@ -841,8 +849,10 @@ #else s = tparm((char *)x, (long)a, (long)b, 0, 0, 0, 0, 0, 0, 0); #endif - if (s == NULL) - fatalx("could not expand %s", tty_term_codes[code].name); + if (s == NULL) { + log_debug("could not expand %s", tty_term_codes[code].name); + return (""); + } return (s); }