Module Name: src Committed By: rillig Date: Tue Apr 6 00:47:00 UTC 2021
Modified Files: src/tests/lib/libcurses/director: testlang_parse.y Log Message: tests/libcurses: clean up table of input functions The previous "table" was an insult to any reader. It was unsorted, listed the functions shuffled, and was not even formatted consistently. No functional change. To generate a diff of this commit: cvs rdiff -u -r1.50 -r1.51 src/tests/lib/libcurses/director/testlang_parse.y Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/tests/lib/libcurses/director/testlang_parse.y diff -u src/tests/lib/libcurses/director/testlang_parse.y:1.50 src/tests/lib/libcurses/director/testlang_parse.y:1.51 --- src/tests/lib/libcurses/director/testlang_parse.y:1.50 Tue Apr 6 00:35:58 2021 +++ src/tests/lib/libcurses/director/testlang_parse.y Tue Apr 6 00:47:00 2021 @@ -1,5 +1,5 @@ %{ -/* $NetBSD: testlang_parse.y,v 1.50 2021/04/06 00:35:58 rillig Exp $ */ +/* $NetBSD: testlang_parse.y,v 1.51 2021/04/06 00:47:00 rillig Exp $ */ /*- * Copyright 2009 Brett Lymn <bl...@netbsd.org> @@ -148,13 +148,17 @@ static void set_cchar(char *, void *); static void set_wchar(char *); 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[] = { - "getch", "mvgetch", "mvwgetch", "wgetch", "getnstr", "getstr", "mvgetnstr", - "mvgetstr", "mvwgetnstr", "mvwgetstr", "wgetnstr", "wgetstr", "mvscanw", - "mvwscanw", "scanw", "wscanw", "get_wch", "mvget_wch", "mvwget_wch", - "wget_wch", "getn_wstr", "get_wstr", "mvgetn_wstr", "mvget_wstr", - "mvwgetn_wstr","mvwget_wstr", "wgetn_wstr", "wget_wstr" + variants("getch"), + variants("getnstr"), + variants("getstr"), + variants("getn_wstr"), + variants("get_wch"), + variants("get_wstr"), + variants("scanw"), }; +#undef variants static const unsigned ninput_functions = sizeof(input_functions) / sizeof(char *);