From 129a0b2bd86d5523883128f2357e1cf6a5e00998 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Fri, 22 Nov 2013 22:11:00 -0800 Subject: Print which option was in error along with usage message Signed-off-by: Alan Coopersmith Reviewed-by: Gaetan Nadon --- appres.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'appres.c') diff --git a/appres.c b/appres.c index 2f43d2d..fad870f 100644 --- a/appres.c +++ b/appres.c @@ -156,8 +156,11 @@ main (int argc, char *argv[]) printf("%s\n", PACKAGE_STRING); exit(0); } - else if (argv[i][0] == '-') + else if (argv[i][0] == '-') { + fprintf(stderr, "%s: unrecognized option '%s'\n", + ProgramName, argv[i]); usage(); + } else if (!cname) cname = argv[i]; else if (!iname) -- cgit v1.2.3