hi.

diff to reduce verbosity in tset(1) usage. before:

$ /usr/bin/tset -Z
tset: unknown option -- Z
Usage: tset [-cIQqrsVw] [-] [-e ch] [-i ch] [-k ch] [-m mapping] [terminal]

Options:
  -c          set control characters
  -e ch       erase character
  -I          no initialization strings
  -i ch       interrupt character
  -k ch       kill character
  -m mapping  map identifier to type
  -Q          do not output control key settings
  -r          display term on stderr
  -s          output TERM set command
  -V          print curses-version
  -w          set window-size

after:

$ /usr/obj/usr.bin/tset/tset -Z
tset: unknown option -- Z
usage: tset [-cIQqrsVw] [-] [-e ch] [-i ch] [-k ch] [-m mapping] [terminal]

ok?
jmc

Index: usr.bin/tset/tset.c
===================================================================
RCS file: /cvs/src/usr.bin/tset/tset.c,v
retrieving revision 1.41
diff -u -p -r1.41 tset.c
--- usr.bin/tset/tset.c 28 Jun 2019 13:35:05 -0000      1.41
+++ usr.bin/tset/tset.c 22 Jun 2021 12:46:16 -0000
@@ -1094,28 +1094,9 @@ obsolete(char **argv)
 static void
 usage(void)
 {
-    static const char *tbl[] =
-    {
-       ""
-       ,"Options:"
-       ,"  -c          set control characters"
-       ,"  -e ch       erase character"
-       ,"  -I          no initialization strings"
-       ,"  -i ch       interrupt character"
-       ,"  -k ch       kill character"
-       ,"  -m mapping  map identifier to type"
-       ,"  -Q          do not output control key settings"
-       ,"  -r          display term on stderr"
-       ,"  -s          output TERM set command"
-       ,"  -V          print curses-version"
-       ,"  -w          set window-size"
-    };
-    unsigned n;
-    (void) fprintf(stderr, "Usage: %s [-cIQqrsVw] [-] "
-       "[-e ch] [-i ch] [-k ch] [-m mapping] [terminal]\n",
+    (void) fprintf(stderr, "usage: %s [-cIQqrsVw] [-] "
+       "[-e ch] [-i ch] [-k ch] [-m mapping] [terminal]",
        _nc_progname);
-    for (n = 0; n < sizeof(tbl) / sizeof(tbl[0]); ++n)
-       fprintf(stderr, "%s\n", tbl[n]);
 
     exit_error();
     /* NOTREACHED */

Reply via email to