diff tests.c @ 587:98812eb78d8e

Add new compile-time optional th_optarg struct field o_arg for specifying the option argument description/name. TH_USE_OPT_ARG must be defined at compile time.
author Matti Hamalainen <ccr@tnsp.org>
date Sun, 12 Jan 2020 18:03:47 +0200
parents 7cb58b683677
children 4fd6ee473d1b
line wrap: on
line diff
--- a/tests.c	Sun Jan 12 18:01:47 2020 +0200
+++ b/tests.c	Sun Jan 12 18:03:47 2020 +0200
@@ -52,10 +52,10 @@
 // Define option arguments
 static const th_optarg arg_opts[] =
 {
-    { 0, '?', "help",       "Show this help", OPT_NONE },
-    { 1, 'v', "verbose",    "Be more verbose", OPT_NONE },
-    { 2, 's', "sets",       "Perform test sets -s <set>[,<set2>..]", OPT_ARGREQ },
-    { 3, 't', "tests",      "Perform only tests (see below)", OPT_ARGREQ },
+    { 0, '?', "help"    , NULL,       "Show this help", OPT_NONE },
+    { 1, 'v', "verbose" , NULL,       "Be more verbose", OPT_NONE },
+    { 2, 's', "sets"    , "<sets>",   "Perform test sets -s <set>[,<set2>..]", OPT_ARGREQ },
+    { 3, 't', "tests"   , "<tests>",  "Perform only tests (see below)", OPT_ARGREQ },
 };
 
 static const int arg_nopts = sizeof(arg_opts) / sizeof(arg_opts[0]);