summaryrefslogtreecommitdiff
path: root/test/sp_tinfo.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/sp_tinfo.c')
-rw-r--r--test/sp_tinfo.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/test/sp_tinfo.c b/test/sp_tinfo.c
index 72b20cfb0c1d..5db7ddd60b7a 100644
--- a/test/sp_tinfo.c
+++ b/test/sp_tinfo.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright 2019-2022,2023 Thomas E. Dickey *
+ * Copyright 2019-2024,2025 Thomas E. Dickey *
* Copyright 2017 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
@@ -28,7 +28,7 @@
****************************************************************************/
/*
- * $Id: sp_tinfo.c,v 1.29 2023/06/24 14:14:56 tom Exp $
+ * $Id: sp_tinfo.c,v 1.31 2025/07/05 15:21:56 tom Exp $
*
* TOTO: add option for non-sp-funcs interface
*/
@@ -138,7 +138,7 @@ static void
show_string(MYDATA * data, const char *name, const char *value)
{
fprintf(data->fp, " %s = ", name);
- if (value == 0) {
+ if (value == NULL) {
fprintf(data->fp, "(missing)");
} else if (value == (char *) -1) {
fprintf(data->fp, "(canceled)");
@@ -218,7 +218,7 @@ do_stuff(MYDATA * data)
define_key_sp(sp, my_text, my_code);
has_key_sp(sp, 0);
key_defined_sp(sp, my_text);
- if ((s = keybound_sp(sp, my_code, 0)) != 0)
+ if ((s = keybound_sp(sp, my_code, 0)) != NULL)
free(s);
#endif
keyname_sp(sp, '?');
@@ -240,7 +240,7 @@ do_stuff(MYDATA * data)
typeahead_sp(sp, FALSE); /* waddch */
use_env_sp(sp, FALSE); /* newterm */
use_tioctl_sp(sp, FALSE); /* newterm */
- intrflush_sp(sp, 0, 0); /* wgetch */
+ intrflush_sp(sp, NULL, 0); /* wgetch */
flushinp_sp(sp); /* waddch */
halfdelay_sp(sp, 5); /* wgetch */
@@ -319,11 +319,8 @@ main(int argc, char *argv[])
case 't':
opt_t = TRUE;
break;
- case OPTS_VERSION:
- show_version(argv);
- ExitProgram(EXIT_SUCCESS);
default:
- usage(ch == OPTS_USAGE);
+ CASE_COMMON;
/* NOTREACHED */
}
}