diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2013-11-04 23:14:22 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2013-11-22 22:13:42 -0800 |
commit | 15d326027827c168511f923e72c64e2131515e19 (patch) | |
tree | 8354aa7b2cb15e62b8b0b47ce193e4541a396cef /bmtoa.c | |
parent | 64bc2b97d408d6fea16716e37f7b5ff1661d57fd (diff) |
Print which option was in error along with usage message
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
Diffstat (limited to 'bmtoa.c')
-rw-r--r-- | bmtoa.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -130,10 +130,16 @@ main (int argc, char *argv[]) filename = NULL; continue; case 'c': - if (++i >= argc) usage (); + if (++i >= argc) { + fprintf(stderr, "%s: -chars requires an argument\n", + ProgramName); + usage (); + } chars = argv[i]; continue; default: + fprintf(stderr, "%s: unrecognized option '%s'\n", + ProgramName, argv[i]); usage (); } } else { |