#define FORMSW 0
{ "form formatfile", 0 },
#define VERSIONSW 1
- { "version", 0 },
+ { "Version", 0 },
#define HELPSW 2
{ "help", 0 },
{ NULL, 0 }
int
main(int argc, char **argv)
{
- int ncomps;
char *cp, *form = NULL;
char buf[BUFSIZ], *fmtstr, **argp, **arguments;
struct format *fmt;
-#ifdef LOCALE
setlocale(LC_ALL, "");
-#endif
invo_name = mhbasename(argv[0]);
/* read user profile/context */
switch (smatch(++cp, switches)) {
case AMBIGSW:
ambigsw(cp, switches);
- done(1);
+ /*sysexits.h EX_USAGE*/
+ exit(1);
case UNKWNSW:
adios(NULL, "-%s unknown", cp);
snprintf(buf, sizeof(buf), "%s [switches]",
invo_name);
print_help(buf, switches, 1);
- done(1);
+ exit(0);
case VERSIONSW:
print_version(invo_name);
- done(1);
+ exit(0);
case FORMSW:
if (!(form = *argp++) || *form == '-')
** Get new format string. Must be before chdir().
*/
fmtstr = new_fs(form, FORMAT);
- ncomps = fmt_compile(fmtstr, &fmt);
+ fmt_compile(fmtstr, &fmt);
fmt_dump(fmt);
- done(0);
- return 1;
+ return 0;
}
static void