Added support for optional Content_Disposition header in mhbuild directive.s
[mmh] / uip / mshcmds.c
index d2d0ad7..63ee99c 100644 (file)
@@ -3,6 +3,10 @@
  * mshcmds.c -- command handlers in msh
  *
  * $Id$
+ *
+ * This code is Copyright (c) 2002, by the authors of nmh.  See the
+ * COPYRIGHT file in the root directory of the nmh distribution for
+ * complete copyright information.
  */
 
 #include <h/mh.h>
@@ -17,8 +21,8 @@
 #include <signal.h>
 #include <h/msh.h>
 #include <h/picksbr.h>
+#include <h/utils.h>
 
-extern int errno;
 
 static char delim3[] = "-------";      /* from burst.c */
 
@@ -2157,8 +2161,7 @@ scancmd (char **args)
                if (*dp == '\\' || *dp == '"' || *dp == '\n')
                    i++;
            i++;
-           if ((ep = malloc ((unsigned) i)) == NULL)
-               adios (NULL, "out of memory");
+           ep = mh_xmalloc ((unsigned) i);
            for (dp = nfs, fp = ep; *dp; dp++) {
                if (*dp == '\n') {
                    *fp++ = '\\', *fp++ = 'n';
@@ -3005,7 +3008,6 @@ process (int msgnum, char *proc, int vecp, char **vec)
     strncpy (tmpfil, m_scratch ("", invo_name), sizeof(tmpfil));
     if ((out = fopen (tmpfil, "w")) == NULL) {
        int olderr;
-       extern int errno;
        char newfil[80];
 
        olderr = errno;