summaryrefslogtreecommitdiff
path: root/test/test_setupterm.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 /test/test_setupterm.c
parent24fa7a5107c5b75d1c197accf0305be64bc72882 (diff)
Vendor import ncurses 6.6vendor/ncurses/6.6vendor/ncurses
Diffstat (limited to 'test/test_setupterm.c')
-rw-r--r--test/test_setupterm.c15
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);