X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/0a032eea07f6d77ac6ea4d5a39c9491c34358058..4b846eff7deb83d1019868cabf7f794651502432:/uip/ap.c diff --git a/uip/ap.c b/uip/ap.c index 2671375f..0e3e8b55 100644 --- a/uip/ap.c +++ b/uip/ap.c @@ -1,5 +1,4 @@ -/* - * ap.c -- parse addresses 822-style +/* ap.c -- parse addresses 822-style * * This code is Copyright (c) 2002, by the authors of nmh. See the * COPYRIGHT file in the root directory of the nmh distribution for @@ -10,7 +9,9 @@ #include #include #include +#include "h/done.h" #include +#include "sbr/terminal.h" #define NADDRS 100 @@ -96,8 +97,7 @@ main (int argc, char **argv) } if (addrp == NADDRS) adios (NULL, "more than %d addresses", NADDRS); - else - addrs[addrp++] = cp; + addrs[addrp++] = cp; } addrs[addrp] = NULL; @@ -129,7 +129,7 @@ main (int argc, char **argv) status += process (addrs[addrp], width); fmt_free (fmt, 1); - done (status); + done(!!status); return 1; } @@ -172,13 +172,13 @@ process (char *arg, int length) cptr = fmt_findcomp ("text"); if (cptr) { - mh_xfree(cptr->c_text); + free(cptr->c_text); cptr->c_text = p->pq_text; p->pq_text = NULL; } cptr = fmt_findcomp ("error"); if (cptr) { - mh_xfree(cptr->c_text); + free(cptr->c_text); cptr->c_text = p->pq_error; p->pq_error = NULL; } @@ -187,8 +187,8 @@ process (char *arg, int length) fputs (charstring_buffer (scanl), stdout); charstring_free (scanl); - mh_xfree(p->pq_text); - mh_xfree(p->pq_error); + free(p->pq_text); + free(p->pq_error); q = p->pq_next; free(p); }