diff options
| author | Baptiste Daroussin <bapt@FreeBSD.org> | 2026-01-14 12:37:49 +0000 |
|---|---|---|
| committer | Baptiste Daroussin <bapt@FreeBSD.org> | 2026-01-14 12:37:49 +0000 |
| commit | c5a1e08b52b2f6c05e0116d46277904b711b6bdb (patch) | |
| tree | a6ad7350d1b1100356ca59616d22c51dd29743eb /ncurses/trace/lib_tracechr.c | |
| parent | 24fa7a5107c5b75d1c197accf0305be64bc72882 (diff) | |
Vendor import ncurses 6.6vendor/ncurses/6.6vendor/ncurses
Diffstat (limited to 'ncurses/trace/lib_tracechr.c')
| -rw-r--r-- | ncurses/trace/lib_tracechr.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ncurses/trace/lib_tracechr.c b/ncurses/trace/lib_tracechr.c index 9c879dc67397..db3cb530908a 100644 --- a/ncurses/trace/lib_tracechr.c +++ b/ncurses/trace/lib_tracechr.c @@ -40,7 +40,7 @@ #include <ctype.h> -MODULE_ID("$Id: lib_tracechr.c,v 1.24 2024/02/04 00:11:35 tom Exp $") +MODULE_ID("$Id: lib_tracechr.c,v 1.26 2024/12/07 21:02:00 tom Exp $") #ifdef TRACE @@ -50,16 +50,16 @@ NCURSES_EXPORT(char *) _nc_tracechar(SCREEN *sp, int ch) { NCURSES_CONST char *name; - char *MyBuffer = ((sp != 0) + char *MyBuffer = ((sp != NULL) ? sp->tracechr_buf : _nc_globals.tracechr_buf); if ((ch > KEY_MIN && !_nc_unicode_locale()) || ch < 0) { name = safe_keyname(SP_PARM, ch); - if (name == 0 || *name == '\0') + if (name == NULL || *name == '\0') name = "NULL"; _nc_SPRINTF(MyBuffer, _nc_SLIMIT(MyBufSize) - "'%.30s' = \\x%02x", name, ch); + "'%.30s' = \\x%02x", name, UChar(ch)); } else if (!is8bits(ch) || (_nc_unicode_locale() && !is7bits(ch)) || !isprint(UChar(ch))) { @@ -72,7 +72,7 @@ _nc_tracechar(SCREEN *sp, int ch) "\\x%02x", ch); } else { name = safe_unctrl(SP_PARM, (chtype) ch); - if (name == 0 || *name == 0) + if (name == NULL || *name == 0) name = "null"; /* shouldn't happen */ _nc_SPRINTF(MyBuffer, _nc_SLIMIT(MyBufSize) "'%.30s' = \\x%02x", name, ch); |
