1 /* mhparam.c - print mh_profile values */
3 static char ident[] = "@(#)$Id: mhparam.c,v 1.9 1993/09/01 23:00:59 jromine Exp $";
5 /* contributed by Jeffrey C Honig <Jeffrey_C_Honig@cornell.edu> */
10 extern char *mhlibdir; /* NB: this will change soon */
11 char *sbackup = SBACKUP;
16 static struct swit switches[] = {
29 static char *p_find();
51 invo_name = r1bindex (argv[0], '/');
52 if ((cp = m_find (invo_name)) != NULL) {
53 ap = brkstring (cp = getcpy (cp), " ", "\n");
54 ap = copyip (ap, arguments);
58 (void) copyip (argv + 1, ap);
63 while (cp = *argp++) {
65 switch (smatch (++cp, switches)) {
67 ambigsw (cp, switches);
70 adios (NULLCP, "-%s unknown", cp);
72 (void) sprintf (buf, "%s [profile-components] [switches]",
96 register struct node *np;
99 advise(NULLCP, "profile-components ignored with -all");
102 advise(NULLCP, "-%scomponents ignored with -all",
103 components ? "" : "no");
106 for (np = m_defs; np; np = np -> n_next)
107 printf("%s:\t%s\n", np -> n_name, np -> n_field);
110 components = compp > 1;
112 for (i = 0; i < compp; i++) {
113 register char *value = m_find(comps[i]);
116 value = p_find(comps[i]);
120 printf("%s:\t", comps[i]);
122 printf("%s\n", value);
131 static struct procs {
135 { "context", &context },
136 { "faceproc", &faceproc },
137 { "fileproc", &fileproc },
138 { "foldprot", &foldprot },
139 { "incproc", &incproc },
140 { "installproc", &installproc },
142 { "mailproc", &mailproc },
143 { "mhlproc", &mhlproc },
144 { "moreproc", &moreproc },
145 { "msgprot", &msgprot },
146 { "mshproc", &mshproc },
147 { "packproc", &packproc },
148 { "postproc", &postproc },
149 { "rmfproc", &rmfproc },
150 { "rmmproc", &rmmproc },
151 { "sendproc", &sendproc },
152 { "showproc", &showproc },
153 { "slocalproc", &slocalproc },
154 { "version", &version },
155 { "vmhproc", &vmhproc },
156 { "whatnowproc", &whatnowproc },
157 { "whomproc", &whomproc },
158 { "libdir", &mhlibdir },
159 { "sbackup", &sbackup },
165 static char *p_find(str)
168 register struct procs *ps;
170 for (ps = procs; ps->p_name; ps++)
171 if (uleq (ps -> p_name, str))
172 return (*ps -> p_field);