X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/c884567409a8a125b57a2b4cab466c7456a37c07..63621a81d16ab743de6b57d47578a9a2c670ad22:/uip/ap.c diff --git a/uip/ap.c b/uip/ap.c index 1b1fee3c..8265723e 100644 --- a/uip/ap.c +++ b/uip/ap.c @@ -1,6 +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 @@ -12,6 +10,7 @@ #include #include #include +#include "sbr/terminal.h" #define NADDRS 100 @@ -97,8 +96,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; @@ -130,7 +128,7 @@ main (int argc, char **argv) status += process (addrs[addrp], width); fmt_free (fmt, 1); - done (status); + done(!!status); return 1; } @@ -173,13 +171,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; } @@ -188,8 +186,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); }