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: clean up table...



details:   https://anonhg.NetBSD.org/src/rev/7d28d9f60edc
branches:  trunk
changeset: 982237:7d28d9f60edc
user:      rillig <rillig%NetBSD.org@localhost>
date:      Tue Apr 06 00:47:00 2021 +0000

description:
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.

diffstat:

 tests/lib/libcurses/director/testlang_parse.y |  16 ++++++++++------
 1 files changed, 10 insertions(+), 6 deletions(-)

diffs (33 lines):

diff -r 761baa71a2bb -r 7d28d9f60edc tests/lib/libcurses/director/testlang_parse.y
--- a/tests/lib/libcurses/director/testlang_parse.y     Tue Apr 06 00:35:58 2021 +0000
+++ b/tests/lib/libcurses/director/testlang_parse.y     Tue Apr 06 00:47:00 2021 +0000
@@ -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 <blymn%NetBSD.org@localhost>
@@ -148,13 +148,17 @@
 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 *);



Home | Main Index | Thread Index | Old Index