X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=uip%2Fali.c;h=61ab6b214f7f42a218f5ee8c30eaa53728196eb0;hb=363d8b056113f4a54e84149977eac95505e38d59;hp=7cffc5043192ea460bae79188dda4a09cd335328;hpb=dee387b53ab0d42922f857b60d6f980c9e79d16f;p=mmh diff --git a/uip/ali.c b/uip/ali.c index 7cffc50..61ab6b2 100644 --- a/uip/ali.c +++ b/uip/ali.c @@ -2,13 +2,16 @@ /* * ali.c -- list nmh mail aliases * - * $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 #include #include #include +#include /* * maximum number of names @@ -46,8 +49,8 @@ extern struct aka *akahead; /* * prototypes */ -void print_aka (char *, int, int); -void print_usr (char *, int, int); +static void print_aka (char *, int, int); +static void print_usr (char *, int, int); int @@ -84,10 +87,10 @@ main (int argc, char **argv) snprintf (buf, sizeof(buf), "%s [switches] aliases ...", invo_name); print_help (buf, switches, 1); - done (1); + done (0); case VERSIONSW: print_version (invo_name); - done (1); + done (0); case ALIASW: if (!(cp = *argp++) || *cp == '-') @@ -165,10 +168,11 @@ main (int argc, char **argv) } } - return done (0); + done (0); + return 1; } -void +static void print_aka (char *p, int list, int margin) { char c; @@ -208,7 +212,7 @@ print_aka (char *p, int list, int margin) pos = 1; } -void +static void print_usr (char *s, int list, int norm) { register char *cp, *pp, *vp; @@ -228,8 +232,8 @@ print_usr (char *s, int list, int norm) while ((cp = getname (pp))) { if ((np = getm (cp, NULL, 0, norm, NULL)) == NULL) continue; - if (!strcasecmp (mp->m_host, np->m_host) - && !strcasecmp (mp->m_mbox, np->m_mbox)) { + if (!mh_strcasecmp (mp->m_host, np->m_host) + && !mh_strcasecmp (mp->m_mbox, np->m_mbox)) { vp = vp ? add (ak->ak_name, add (",", vp)) : getcpy (ak->ak_name); mnfree (np);