]> diplodocus.org Git - nmh/blobdiff - uip/ap.c
Added tests of MMDF mailbox format to test-eom-align.
[nmh] / uip / ap.c
index ea93fd6f78584492063ba6f6adfbdaaa726c9d5e..0e3e8b554ae65f0df56be6f29935e9ab561da72f 100644 (file)
--- a/uip/ap.c
+++ b/uip/ap.c
@@ -9,7 +9,9 @@
 #include <h/addrsbr.h>
 #include <h/fmt_scan.h>
 #include <h/mts.h>
+#include "h/done.h"
 #include <h/utils.h>
+#include "sbr/terminal.h"
 
 #define        NADDRS  100
 
@@ -127,7 +129,7 @@ main (int argc, char **argv)
        status += process (addrs[addrp], width);
 
     fmt_free (fmt, 1);
-    done (status);
+    done(!!status);
     return 1;
 }
 
@@ -170,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;
        }
@@ -185,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);
     }