X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/c25e555e6ffca87394f2dee5e4090406a6e45259..6547ca9f73c3f02b2356017bbd7ff85292f8e4a1:/uip/mhparam.c diff --git a/uip/mhparam.c b/uip/mhparam.c index 17705bc8..e8047be6 100644 --- a/uip/mhparam.c +++ b/uip/mhparam.c @@ -10,6 +10,7 @@ #include #include +#include "h/done.h" #include #define MHPARAM_SWITCHES \ @@ -114,7 +115,6 @@ static struct proc procs [] = { { "whomproc", &whomproc }, { "bindir", &mhbindir }, { "libexecdir", &mhlibexecdir }, - { "libdir", &mhlibexecdir }, { "etcdir", &mhetcdir }, { "docdir", &mhdocdir }, { "localmbox", &localmbox }, @@ -132,13 +132,14 @@ static struct proc procs [] = { /* * static prototypes */ -static char *p_find(char *); +static char *p_find(char *) PURE; int main(int argc, char **argv) { - int i, compp = 0, missed = 0; + int i, compp = 0; + bool missed; int all = 0, debug = 0; int components = -1; char *cp, buf[BUFSIZ], **argp; @@ -233,6 +234,7 @@ main(int argc, char **argv) } + missed = false; if (! all) { if (components < 0) components = compp > 1; @@ -253,13 +255,12 @@ main(int argc, char **argv) printf("%s: ", comps[i]); puts(value); - } else if (missed < 120) - missed++; + } else + missed = true; } } - done (missed); - return 1; + done(missed); } @@ -270,7 +271,7 @@ p_find(char *str) for (ps = procs; ps->p_name; ps++) if (!strcasecmp (ps->p_name, str)) - return (*ps->p_field); + return *ps->p_field; return NULL; }