Added -nocontentid (and -contentid, for symmetry) switch to mhbuild. This allows...
[mmh] / uip / dropsbr.c
index 7f432ea..2b3d020 100644 (file)
  */
 
 #include <h/nmh.h>
+#include <h/utils.h>
 
-#ifndef        MMDFONLY
-# include <h/mh.h>
-# include <h/dropsbr.h>
-# include <h/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>
@@ -224,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;
        }
     }