summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2023-02-11 11:17:41 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2023-02-11 11:17:41 -0800
commite7c9e106e65767598b786804dc7324adc50d7efc (patch)
tree077587ecfb2a6bb6f04db286073ffd9a3cb9f872
parent37ee1293a35cd2f86463e2954f44db58692aa053 (diff)
Print which arguments were unknown before giving usage message
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--xfontsel.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/xfontsel.c b/xfontsel.c
index c4d16f7..653d532 100644
--- a/xfontsel.c
+++ b/xfontsel.c
@@ -319,7 +319,14 @@ main(int argc, char **argv)
}
#endif
- if (argc != 1) Syntax(argv[0]);
+ if (argc != 1) {
+ fputs(gettext("Unknown argument(s):"), stderr);
+ for (int n = 1; n < argc; n++) {
+ fprintf(stderr, " %s", argv[n]);
+ }
+ fputs("\n\n", stderr);
+ Syntax(argv[0]);
+ }
XtAppAddActions(appCtx, xfontsel_actions, XtNumber(xfontsel_actions));
XtOverrideTranslations