diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2023-02-09 18:09:20 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2023-02-09 18:09:20 -0800 |
commit | 6c0e96db7bc9ac9052154430fe726c96745fa387 (patch) | |
tree | d01c7d164bdd477e5729a155f1e36482cd36c932 /viewres.c | |
parent | 4b21bf3702bb2548eee4bd44f48e4259c09ad487 (diff) |
Print which argument was unknown before giving usage message
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'viewres.c')
-rw-r--r-- | viewres.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -895,8 +895,14 @@ main(int argc, char *argv[]) Options, XtNumber(Options), &argc, argv, (String *) fallback_resources, (ArgList) NULL, ZERO); - if (argc != 1) + if (argc != 1) { + fputs("Unknown argument(s):", stderr); + for (int n = 1; n < argc; n++) { + fprintf(stderr, " %s", argv[n]); + } + fputs("\n\n", stderr); usage(); + } initialize_widgetnode_list(&selected_list.elements, &selected_list.max_elements, 10); |