Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/lib/libcurses/director tests/libcurses: sprinkle 'cons...
details: https://anonhg.NetBSD.org/src/rev/f77a0413c354
branches: trunk
changeset: 983904:f77a0413c354
user: rillig <rillig%NetBSD.org@localhost>
date: Sun Jun 13 11:06:20 2021 +0000
description:
tests/libcurses: sprinkle 'const', normalize sizeof
No functional change.
diffstat:
tests/lib/libcurses/director/testlang_parse.y | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diffs (55 lines):
diff -r 76aadb85f88d -r f77a0413c354 tests/lib/libcurses/director/testlang_parse.y
--- a/tests/lib/libcurses/director/testlang_parse.y Sun Jun 13 10:25:11 2021 +0000
+++ b/tests/lib/libcurses/director/testlang_parse.y Sun Jun 13 11:06:20 2021 +0000
@@ -1,5 +1,5 @@
%{
-/* $NetBSD: testlang_parse.y,v 1.52 2021/04/06 01:29:37 rillig Exp $ */
+/* $NetBSD: testlang_parse.y,v 1.53 2021/06/13 11:06:20 rillig Exp $ */
/*-
* Copyright 2009 Brett Lymn <blymn%NetBSD.org@localhost>
@@ -82,7 +82,7 @@
static wchar_t *vals = NULL; /* wchars to attach to a cchar type */
static unsigned nvals; /* number of wchars */
-const char *enum_names[] = { /* for data_enum_t */
+const char *const enum_names[] = { /* for data_enum_t */
"unused", "numeric", "static", "string", "byte", "cchar", "wchar", "ERR",
"OK", "NULL", "not NULL", "variable", "reference", "return count",
"slave error"
@@ -116,7 +116,7 @@
static size_t nvars; /* Number of declared variables */
static var_t *vars; /* Variables defined during the test. */
-static int check_function_table(char *, const char *[], int);
+static int check_function_table(char *, const char *const[], int);
static int find_var_index(const char *);
static void assign_arg(data_enum_t, void *);
static int assign_var(const char *);
@@ -149,7 +149,7 @@
static wchar_t *add_to_vals(data_enum_t, void *);
#define variants(fn) "" fn, "mv" fn, "w" fn, "mvw" fn
-static const char *input_functions[] = {
+static const char *const input_functions[] = {
variants("getch"),
variants("getnstr"),
variants("getstr"),
@@ -161,7 +161,7 @@
#undef variants
static const unsigned ninput_functions =
- sizeof(input_functions) / sizeof(char *);
+ sizeof(input_functions) / sizeof(input_functions[0]);
extern saved_data_t saved_output;
@@ -875,7 +875,7 @@
* there is a match.
*/
static int
-check_function_table(char *function, const char *table[], int nfunctions)
+check_function_table(char *function, const char *const table[], int nfunctions)
{
int i;
Home |
Main Index |
Thread Index |
Old Index