summaryrefslogtreecommitdiff
path: root/ncurses/tty/lib_tstp.c
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2026-01-14 13:37:49 +0100
committerBaptiste Daroussin <bapt@FreeBSD.org>2026-01-14 13:37:49 +0100
commitc5a1e08b52b2f6c05e0116d46277904b711b6bdb (patch)
treea6ad7350d1b1100356ca59616d22c51dd29743eb /ncurses/tty/lib_tstp.c
parent24fa7a5107c5b75d1c197accf0305be64bc72882 (diff)
Vendor import ncurses 6.6vendor/ncurses/6.6vendor/ncurses
Diffstat (limited to 'ncurses/tty/lib_tstp.c')
-rw-r--r--ncurses/tty/lib_tstp.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/ncurses/tty/lib_tstp.c b/ncurses/tty/lib_tstp.c
index dd925c7efd12..3bd872c1dcf1 100644
--- a/ncurses/tty/lib_tstp.c
+++ b/ncurses/tty/lib_tstp.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright 2020-2021,2022 Thomas E. Dickey *
+ * Copyright 2020-2024,2025 Thomas E. Dickey *
* Copyright 1998-2014,2017 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
@@ -43,7 +43,7 @@
#include <SigAction.h>
-MODULE_ID("$Id: lib_tstp.c,v 1.54 2022/12/24 22:22:10 tom Exp $")
+MODULE_ID("$Id: lib_tstp.c,v 1.59 2025/02/15 14:52:13 tom Exp $")
#if defined(SIGTSTP) && (HAVE_SIGACTION || HAVE_SIGVEC)
#define USE_SIGTSTP 1
@@ -159,7 +159,7 @@ handle_SIGTSTP(int dummy GCC_UNUSED)
*
* Don't do this if we're not in curses -
*/
- if (sp != 0 && (sp->_endwin == ewRunning))
+ if (sp != NULL && (sp->_endwin == ewRunning))
#if HAVE_TCGETPGRP
if (tcgetpgrp(STDIN_FILENO) == getpgrp())
#endif
@@ -269,7 +269,7 @@ handle_SIGINT(int sig)
{
SCREEN *scan;
for (each_screen(scan)) {
- if (scan->_ofp != 0
+ if (scan->_ofp != NULL
&& NC_ISATTY(fileno(scan->_ofp))) {
scan->_outch = NCURSES_SP_NAME(_nc_outch);
}
@@ -294,7 +294,7 @@ _nc_set_read_thread(bool enable)
# endif
_nc_globals.read_thread = pthread_self();
} else {
- _nc_globals.read_thread = 0;
+ _nc_globals.read_thread = (pthread_t) 0;
}
_nc_unlock_global(curses);
}
@@ -310,7 +310,7 @@ handle_SIGWINCH(int sig GCC_UNUSED)
if (_nc_globals.read_thread) {
if (!pthread_equal(pthread_self(), _nc_globals.read_thread))
pthread_kill(_nc_globals.read_thread, SIGWINCH);
- _nc_globals.read_thread = 0;
+ _nc_globals.read_thread = (pthread_t) 0;
}
# endif
}
@@ -367,8 +367,8 @@ CatchIfDefault(int sig, void (*handler) (int))
result = FALSE;
}
#endif
- T(("CatchIfDefault - will %scatch %s",
- result ? "" : "not ", signal_name(sig)));
+ T(("CatchIfDefault - will%s catch %s",
+ result ? "" : " not", signal_name(sig)));
return result;
}