summaryrefslogtreecommitdiff
path: root/bmtoa.c
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2013-11-04 23:14:22 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2013-11-22 22:13:42 -0800
commit15d326027827c168511f923e72c64e2131515e19 (patch)
tree8354aa7b2cb15e62b8b0b47ce193e4541a396cef /bmtoa.c
parent64bc2b97d408d6fea16716e37f7b5ff1661d57fd (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.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/bmtoa.c b/bmtoa.c
index 0394038..a9de614 100644
--- a/bmtoa.c
+++ b/bmtoa.c
@@ -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 {