X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/a5a1425258ffb1f72e853b6adc6ff0ae58c636bd..39ecf70bb:/uip/ali.c?ds=sidebyside diff --git a/uip/ali.c b/uip/ali.c index 4d73afa7..a75edf36 100644 --- a/uip/ali.c +++ b/uip/ali.c @@ -1,6 +1,4 @@ - -/* - * ali.c -- list nmh mail aliases +/* ali.c -- list nmh mail aliases * * This code is Copyright (c) 2002, by the authors of nmh. See the * COPYRIGHT file in the root directory of the nmh distribution for @@ -143,9 +141,13 @@ main (int argc, char **argv) } else { /* print them all */ for (ak = akahead; ak; ak = ak->ak_next) { + char *res; + printf ("%s: ", ak->ak_name); pos += strlen (ak->ak_name) + 1; - print_aka (akresult (ak), list, pos); + res = akresult(ak); + print_aka(res, list, pos); + free(res); } } } @@ -215,10 +217,10 @@ print_usr (char *s, int list) while ((cp = getname (pp))) { if ((np = getm (cp, NULL, 0, NULL, 0)) == NULL) continue; - if (!strcasecmp (mp->m_host ? mp->m_host : "", - np->m_host ? np->m_host : "") && - !strcasecmp (mp->m_mbox ? mp->m_mbox : "", - np->m_mbox ? np->m_mbox : "")) { + if (!strcasecmp (FENDNULL(mp->m_host), + FENDNULL(np->m_host)) && + !strcasecmp (FENDNULL(mp->m_mbox), + FENDNULL(np->m_mbox))) { vp = vp ? add (ak->ak_name, add (",", vp)) : getcpy (ak->ak_name); mnfree (np);