X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/83e9f61111251e7841e2bb35a3591e123ca0a8bb..63621a81d16ab743de6b57d47578a9a2c670ad22:/uip/ap.c diff --git a/uip/ap.c b/uip/ap.c index a44ecf55..8265723e 100644 --- a/uip/ap.c +++ b/uip/ap.c @@ -10,6 +10,7 @@ #include #include #include +#include "sbr/terminal.h" #define NADDRS 100 @@ -127,7 +128,7 @@ main (int argc, char **argv) status += process (addrs[addrp], width); fmt_free (fmt, 1); - done(min(status, MAX_EXIT)); + done(!!status); return 1; } @@ -170,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; } @@ -185,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); }