#include <h/mh.h>
extern char *mhlibdir;
-extern char *mhetcdir;
static struct swit switches[] = {
#define COMPSW 0
{ "mh-sequences", &mh_seq },
{ "buildmimeproc", &buildmimeproc },
{ "editor", &defaulteditor },
- { "faceproc", &faceproc },
{ "fileproc", &fileproc },
{ "foldprot", &foldprot },
{ "incproc", &incproc },
- { "installproc", &installproc },
{ "lproc", &lproc },
{ "mailproc", &mailproc },
{ "mhlproc", &mhlproc },
{ "moreproc", &moreproc },
{ "msgprot", &msgprot },
- { "packproc", &packproc },
{ "postproc", &postproc },
- { "rmfproc", &rmfproc },
{ "rmmproc", &rmmproc },
{ "sendmail", &sendmail },
{ "sendproc", &sendproc },
char *cp, buf[BUFSIZ], **argp;
char **arguments, *comps[MAXARGS];
- invo_name = r1bindex(argv[0], '/');
+ invo_name = mhbasename(argv[0]);
/* read user profile/context */
context_read();
while ((cp = *argp++)) {
if (*cp == '-') {
switch (smatch(++cp, switches)) {
- case AMBIGSW:
- ambigsw(cp, switches);
- done(1);
- case UNKWNSW:
- adios(NULL, "-%s unknown", cp);
-
- case HELPSW:
- snprintf(buf, sizeof(buf), "%s [profile-components] [switches]", invo_name);
- print_help(buf, switches, 1);
- done(1);
- case VERSIONSW:
- print_version(invo_name);
- done(1);
-
- case COMPSW:
- components = 1;
- break;
- case NCOMPSW:
- components = 0;
- break;
-
- case ALLSW:
- all = 1;
- break;
-
- case DEBUGSW:
- debug = 1;
- break;
+ case AMBIGSW:
+ ambigsw(cp, switches);
+ done(1);
+ case UNKWNSW:
+ adios(NULL, "-%s unknown", cp);
+
+ case HELPSW:
+ snprintf(buf, sizeof(buf), "%s [profile-components] [switches]", invo_name);
+ print_help(buf, switches, 1);
+ done(1);
+ case VERSIONSW:
+ print_version(invo_name);
+ done(1);
+
+ case COMPSW:
+ components = 1;
+ break;
+ case NCOMPSW:
+ components = 0;
+ break;
+
+ case ALLSW:
+ all = 1;
+ break;
+
+ case DEBUGSW:
+ debug = 1;
+ break;
}
} else {
comps[compp++] = cp;