summaryrefslogtreecommitdiffstats
path: root/debian/patches/upstream-bf636d9575.diff
blob: 551b36b9e8c41e77ef898bc888769c77d2644ff0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
From 624b9567c70976766065c826b73234925b052595 Mon Sep 17 00:00:00 2001
From: nicm <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);
 }