- case AMBIGSW:
- ambigsw(cp, switches);
- done(1);
- case UNKWNSW:
- adios(NULL, "-%s unknown", cp);
-
- case HELPSW:
- snprintf(buf, sizeof(buf), "%s [addrs ... [switches]]", invo_name);
- print_help(buf, switches, 0);
- done(1);
- case VERSIONSW:
- print_version(invo_name);
- done(1);
-
- case FROMSW:
- if (!(from = *argp++) || *from == '-')
- adios(NULL, "missing argument to %s", argp[-2]);
- continue;
-
- case BODYSW:
- if (!(body = *argp++) || *body == '-')
- adios(NULL, "missing argument to %s", argp[-2]);
- continue;
-
- case CCSW:
- iscc++;
- continue;
-
- case SUBJSW:
- if (!(subject = *argp++) || *subject == '-')
- adios(NULL, "missing argument to %s", argp[-2]);
- continue;
-
- case RESNDSW:
- resent++;
- continue;
-
- case QUEUESW:
- queued++;
- continue;
+ case AMBIGSW:
+ ambigsw(cp, switches);
+ exit(EX_USAGE);
+ case UNKWNSW:
+ adios(EX_USAGE, NULL, "-%s unknown", cp);
+
+ case HELPSW:
+ snprintf(buf, sizeof(buf),
+ "%s addrs... [switches]",
+ invo_name);
+ print_help(buf, switches, 0);
+ exit(argc == 2 ? EX_OK : EX_USAGE);
+ case VERSIONSW:
+ print_version(invo_name);
+ exit(argc == 2 ? EX_OK : EX_USAGE);
+
+ case FROMSW:
+ if (!(from = *argp++) || *from == '-')
+ adios(EX_USAGE, NULL, "missing argument to %s",
+ argp[-2]);
+ continue;
+
+ case BODYSW:
+ if (!(body = *argp++) || *body == '-')
+ adios(EX_USAGE, NULL, "missing argument to %s",
+ argp[-2]);
+ continue;
+
+ case CCSW:
+ iscc++;
+ continue;
+
+ case SUBJSW:
+ if (!(subject = *argp++) || *subject == '-')
+ adios(EX_USAGE, NULL, "missing argument to %s",
+ argp[-2]);
+ continue;