From 85a3ccd43c4601c9d80bea8441ec9711af9bd52d Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Mon, 6 Feb 2023 18:20:20 -0800 Subject: List which options were unrecognized before printing usage message Signed-off-by: Alan Coopersmith --- editres.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'editres.c') diff --git a/editres.c b/editres.c index 309aaa9..f565196 100644 --- a/editres.c +++ b/editres.c @@ -113,8 +113,14 @@ main(int argc, char **argv) &argc, argv, fallback_resources, 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); Syntax(app_con, argv[0], 1); + } SetApplicationActions(app_con); XtGetApplicationResources(global_toplevel, (XtPointer) &global_resources, -- cgit v1.2.3