summaryrefslogtreecommitdiff
path: root/listres.c
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2023-02-08 15:09:58 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2023-02-09 11:58:28 -0800
commit3f09f6c5771cfc70ab73ce301da683c3884cabd1 (patch)
tree71552862d4c5b2d1f9fcae9e991917fbaf745208 /listres.c
parent1565da2398ea92eb5e2bf9a308c004feedfe1fa6 (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.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/listres.c b/listres.c
index 5f9c348..2b73181 100644
--- a/listres.c
+++ b/listres.c
@@ -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",