Documented mhparam -debug option.
[mmh] / uip / mhparam.c
index f6ebb65..d260352 100644 (file)
@@ -5,7 +5,9 @@
  * Originally contributed by
  * Jeffrey C Honig <Jeffrey_C_Honig@cornell.edu>
  *
- * $Id$
+ * This code is Copyright (c) 2002, by the authors of nmh.  See the
+ * COPYRIGHT file in the root directory of the nmh distribution for
+ * complete copyright information.
  */
 
 #include <h/mh.h>
@@ -14,7 +16,6 @@ extern char *mhlibdir;
 extern char *mhetcdir;
 
 char *sbackup = BACKUP_PREFIX;
-char *slink = LINK;
 
 static struct swit switches[] = {
 #define        COMPSW    0
@@ -26,9 +27,9 @@ static struct swit switches[] = {
 #define VERSIONSW 3
     { "version", 0 },
 #define        HELPSW    4
-    { "help", 4 },
+    { "help", 0 },
 #define DEBUGSW   5
-    { "debug", -5 },
+    { "debug", 5 },
     { NULL, 0 }
 };
 
@@ -41,9 +42,9 @@ static struct proc procs [] = {
      { "context",       &context },
      { "mh-sequences",  &mh_seq },
      { "buildmimeproc", &buildmimeproc },
-     { "faceproc",      &faceproc },
      { "fileproc",      &fileproc },
      { "foldprot",      &foldprot },
+     { "formatproc",   &formatproc },
      { "incproc",       &incproc },
      { "installproc",   &installproc  },
      { "lproc",         &lproc },
@@ -54,7 +55,6 @@ static struct proc procs [] = {
      { "mshproc",       &mshproc },
      { "packproc",      &packproc },
      { "postproc",      &postproc },
-     { "rmfproc",       &rmfproc },
      { "rmmproc",       &rmmproc },
      { "sendproc",      &sendproc },
      { "showmimeproc",  &showmimeproc },
@@ -66,7 +66,6 @@ static struct proc procs [] = {
      { "etcdir",        &mhetcdir },
      { "libdir",        &mhlibdir },
      { "sbackup",       &sbackup },
-     { "link",          &slink },
      { NULL,            NULL },
 };
 
@@ -107,10 +106,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;
@@ -146,7 +145,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;
 
        /*
@@ -177,7 +176,8 @@ main(int argc, char **argv)
        }
     }
     
-    return done (missed);
+    done (missed);
+    return 1;
 }
 
 
@@ -187,7 +187,7 @@ p_find(char *str)
     struct proc *ps;
 
     for (ps = procs; ps->p_name; ps++)
-       if (!strcasecmp (ps->p_name, str))
+       if (!mh_strcasecmp (ps->p_name, str))
            return (*ps->p_field);
 
     return NULL;