diff options
Diffstat (limited to 'test/test_setupterm.c')
| -rw-r--r-- | test/test_setupterm.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/test/test_setupterm.c b/test/test_setupterm.c index 24d7c46c7773..3f53bf89b0d6 100644 --- a/test/test_setupterm.c +++ b/test/test_setupterm.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020-2022,2023 Thomas E. Dickey * + * Copyright 2020-2024,2025 Thomas E. Dickey * * Copyright 2015,2016 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -30,7 +30,7 @@ /* * Author: Thomas E. Dickey * - * $Id: test_setupterm.c,v 1.17 2023/06/24 14:19:52 tom Exp $ + * $Id: test_setupterm.c,v 1.19 2025/07/05 15:21:56 tom Exp $ * * A simple demo of setupterm/restartterm. */ @@ -98,9 +98,9 @@ test_rc(NCURSES_CONST char *name, int actual_rc, int actual_err) int expect_rc = -1; int expect_err = -1; - if (name == 0) + if (name == NULL) name = getenv("TERM"); - if (name == 0) + if (name == NULL) name = "?"; switch (*name) { @@ -207,11 +207,8 @@ main(int argc, char *argv[]) r_opt = TRUE; break; #endif - case OPTS_VERSION: - show_version(argv); - ExitProgram(EXIT_SUCCESS); default: - usage(ch == OPTS_USAGE); + CASE_COMMON; /* NOTREACHED */ } } @@ -244,7 +241,7 @@ main(int argc, char *argv[]) } if (a_opt) { - static char predef[][9] = + static char predef[][12] = {"vt100", "dumb", "lpr", "unknown", "none-such"}; if (optind < argc) { usage(FALSE); |
