Changed exit status of each nmh command's -version and -help switches
[mmh] / uip / mhparam.c
index 19f418e..9e6e05c 100644 (file)
@@ -16,7 +16,6 @@ extern char *mhlibdir;
 extern char *mhetcdir;
 
 char *sbackup = BACKUP_PREFIX;
-char *slink = LINK;
 
 static struct swit switches[] = {
 #define        COMPSW    0
@@ -46,6 +45,7 @@ static struct proc procs [] = {
      { "faceproc",      &faceproc },
      { "fileproc",      &fileproc },
      { "foldprot",      &foldprot },
+     { "formatproc",   &formatproc },
      { "incproc",       &incproc },
      { "installproc",   &installproc  },
      { "lproc",         &lproc },
@@ -56,7 +56,6 @@ static struct proc procs [] = {
      { "mshproc",       &mshproc },
      { "packproc",      &packproc },
      { "postproc",      &postproc },
-     { "rmfproc",       &rmfproc },
      { "rmmproc",       &rmmproc },
      { "sendproc",      &sendproc },
      { "showmimeproc",  &showmimeproc },
@@ -68,7 +67,6 @@ static struct proc procs [] = {
      { "etcdir",        &mhetcdir },
      { "libdir",        &mhlibdir },
      { "sbackup",       &sbackup },
-     { "link",          &slink },
      { NULL,            NULL },
 };
 
@@ -109,10 +107,10 @@ main(int argc, char **argv)
                    snprintf (buf, sizeof(buf), "%s [profile-components] [switches]",
                        invo_name);
                    print_help (buf, switches, 1);
-                   done (1);
+                   done (0);
                case VERSIONSW:
                    print_version(invo_name);
-                   done (1);
+                   done (0);
 
                case COMPSW:
                    components = 1;
@@ -148,7 +146,7 @@ main(int argc, char **argv)
        for (np = m_defs; np; np = np->n_next)
            printf("%s: %s\n", np->n_name, np->n_field);
 
-    } if (debug) {
+    } else if (debug) {
        struct proc *ps;
 
        /*