X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/b56c88e2847c582f9b18ae5bbda44f033cd49c42..2db8ea3cc5e4fb968f1872591cf1ff56fc408ff8:/uip/ali.c diff --git a/uip/ali.c b/uip/ali.c index e7c865be..47b590da 100644 --- a/uip/ali.c +++ b/uip/ali.c @@ -15,7 +15,7 @@ #define ALI_SWITCHES \ X("alias aliasfile", 0, ALIASW) \ - X("noalias", -7, NALIASW) \ + X("noalias", 0, NALIASW) \ X("list", 0, LISTSW) \ X("nolist", 0, NLISTSW) \ X("user", 0, USERSW) \ @@ -55,7 +55,7 @@ main (int argc, char **argv) if (nmh_init(argv[0], 1)) { return 1; } - mts_init (invo_name); + mts_init (); arguments = getarguments (invo_name, argc, argv, 1); argp = arguments; @@ -117,11 +117,10 @@ main (int argc, char **argv) if ((cp = context_find ("Aliasfile"))) { char *dp = NULL; - for (ap = brkstring(dp = getcpy(cp), " ", "\n"); ap && *ap; ap++) + for (ap = brkstring(dp = mh_xstrdup(cp), " ", "\n"); ap && *ap; ap++) if ((i = alias (*ap)) != AK_OK) adios (NULL, "aliasing error in %s - %s", *ap, akerror (i)); - if (dp) - free(dp); + mh_xfree(dp); } alias (AliasFile); } @@ -199,9 +198,9 @@ print_aka (char *p, int list, int margin) static void print_usr (char *s, int list) { - register char *cp, *pp, *vp; - register struct aka *ak; - register struct mailname *mp, *np; + char *cp, *pp, *vp; + struct aka *ak; + struct mailname *mp, *np; if ((pp = getname (s)) == NULL) adios (NULL, "no address in \"%s\"", s); @@ -234,6 +233,5 @@ print_usr (char *s, int list) print_aka (vp ? vp : s, list, 0); - if (vp) - free (vp); + mh_xfree(vp); }