summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xfd.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/xfd.c b/xfd.c
index 5eae374..8108d19 100644
--- a/xfd.c
+++ b/xfd.c
@@ -194,6 +194,15 @@ main(int argc, char *argv[])
xfd_options, XtNumber(xfd_options),
&argc, argv, NULL, NULL, 0);
+ 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 ();
+ }
+
#ifdef USE_GETTEXT
{
const char *domaindir;
@@ -214,7 +223,6 @@ main(int argc, char *argv[])
Resources[3].default_addr = gettext(DEF_START_FORMAT);
Resources[4].default_addr = gettext(DEF_NOCHAR_FORMAT);
- if (argc != 1) usage ();
XtAppAddActions (xtcontext, xfd_actions, XtNumber (xfd_actions));
XtOverrideTranslations
(toplevel, XtParseTranslationTable ("<Message>WM_PROTOCOLS: Quit()"));