[master] 3cf3e0eaf varnishhist: ignore curs_set() errors
Nils Goroll
nils.goroll at uplex.de
Fri Feb 7 21:49:08 UTC 2025
commit 3cf3e0eafef7d5c3c18892e4e02f543d015d59bc
Author: Nils Goroll <nils.goroll at uplex.de>
Date: Fri Feb 7 20:30:33 2025 +0100
varnishhist: ignore curs_set() errors
Don't abort if the terminal does not support invisible cursors.
Fixes #3757
diff --git a/bin/varnishhist/varnishhist.c b/bin/varnishhist/varnishhist.c
index 03251fce4..2e7e7cea3 100644
--- a/bin/varnishhist/varnishhist.c
+++ b/bin/varnishhist/varnishhist.c
@@ -58,8 +58,10 @@
#if 1
#define AC(x) assert((x) != ERR)
+#define IC(x) (void)x
#else
-#define AC(x) x
+#define AC(x) (void)x
+#define IC(x) (void)x
#endif
#define HIST_N 2000 /* how far back we remember */
@@ -380,7 +382,7 @@ do_curses(void *arg)
AC(noecho());
AC(nonl());
AC(intrflush(stdscr, FALSE));
- AC(curs_set(0));
+ IC(curs_set(0));
AC(erase());
while (!VSIG_int && !VSIG_term && !VSIG_hup) {
More information about the varnish-commit
mailing list