This patch:
--- trunk/compilers/imcc/main.c (original)
+++ trunk/compilers/imcc/main.c Tue Jul 18 01:33:59 2006
@@ -369,7 +369,7 @@
exit(EX_USAGE);
}
if (*argc == opt.opt_index ) {
- fprintf(stderr, "Missing option value or program name\n");
+ fprintf(stderr, "Option %s expects an argument\n", (*argv)[*argc -
1]);
usage(stderr);
exit(EX_USAGE);
}
... provides quite misleading results:
$ parrot -o file.pir
Option file.pir expects an argument
parrot -[abcCEfgGhjprStvVwy.] [-d [FLAGS]] [-O [level]] [-o FILE] <file>
I don't believe there's a working heuristic for guessing which parameter the
user failed to provide. That's why I didn't write the original version that
way.
-- c