diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2023-02-08 15:09:58 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2023-02-09 11:58:28 -0800 |
commit | 3f09f6c5771cfc70ab73ce301da683c3884cabd1 (patch) | |
tree | 71552862d4c5b2d1f9fcae9e991917fbaf745208 /listres.c | |
parent | 1565da2398ea92eb5e2bf9a308c004feedfe1fa6 (diff) |
Print which argument was unknown before giving usage message
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'listres.c')
-rw-r--r-- | listres.c | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -262,13 +262,18 @@ main (int argc, char **argv) (Bool) options.show_superclass, (Bool) options.show_variable); } - } else + } else { + fprintf(stderr, "Unknown argument: %s\n", argv[0]); usage(); + } } else { for (; argc > 0; argc--, argv++) { XmuWidgetNode *node; - if (argv[0][0] == '-') usage (); + if (argv[0][0] == '-') { + fprintf(stderr, "Unknown argument: %s\n", argv[0]); + usage(); + } node = XmuWnNameToNode (widget_list, nwidgets, *argv); if (!node) { fprintf (stderr, "%s: unable to find widget \"%s\"\n", |