Added -nocontentid (and -contentid, for symmetry) switch to mhbuild. This allows...
[mmh] / uip / dropsbr.c
index 3c5fdd5..2b3d020 100644 (file)
@@ -3,20 +3,19 @@
  * dropsbr.c -- create/read/manipulate mail drops
  *
  * $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/nmh.h>
+#include <h/utils.h>
 
-#ifndef        MMDFONLY
-# include <h/mh.h>
-# include <h/dropsbr.h>
-# include <mts/generic/mts.h>
-# include <h/tws.h>
-#else
-# include "dropsbr.h"
-# include "strings.h"
-# include "mmdfonly.h"
-#endif
+#include <h/mh.h>
+#include <h/dropsbr.h>
+#include <h/mts.h>
+#include <h/tws.h>
 
 #ifdef HAVE_ERRNO_H
 # include <errno.h>
@@ -31,8 +30,6 @@
 
 #include <fcntl.h>
 
-extern int errno;
-
 /*
  * static prototypes
  */
@@ -222,14 +219,8 @@ mbx_read (FILE *fp, long pos, struct drop **drops, int noisy)
        if (dp >= ep) {
            register int    curlen = dp - pp;
 
-           cp = (struct drop *) realloc ((char *) pp,
+           cp = (struct drop *) mh_xrealloc ((char *) pp,
                                    (size_t) (len += MAXFOLDER) * sizeof(*pp));
-           if (cp == NULL) {
-               if (noisy)
-                   admonish (NULL, "unable to allocate drop storage");
-               free ((char *) pp);
-               return 0;
-           }
            dp = cp + curlen, ep = (pp = cp) + len - 1;
        }
     }