]> diplodocus.org Git - nmh/blobdiff - h/mh.h
Replaced snprintf() to convert an int with m_name().
[nmh] / h / mh.h
diff --git a/h/mh.h b/h/mh.h
index a72971dfd3821fdd8690aa1db4adaa671eba5ff3..6b7dec613a75a0c9984654c767482d3169fdc064 100644 (file)
--- a/h/mh.h
+++ b/h/mh.h
@@ -20,7 +20,7 @@
  * This macro is for use by scan, for example, so that platforms with
  * a small BUFSIZ can easily allocate larger buffers.
  */
-#define NMH_BUFSIZ  (BUFSIZ>=8192 ? BUFSIZ : 8192)
+#define NMH_BUFSIZ  max(BUFSIZ, 8192)
 
 #ifndef FALSE
 #define FALSE false
@@ -48,6 +48,9 @@ typedef unsigned char  boolean;  /* not int so we can pack in a structure */
  * terminating NUL. */
 #define LEN(s) (sizeof (s) - 1)
 
+/* FENDNULL fends off NULL by giving an empty string instead. */
+#define FENDNULL(s) ((s) ? (s) : "")
+
 /*
  * char array that keeps track of size in both bytes and characters
  * Usage note:
@@ -350,8 +353,6 @@ struct msgs {
 #define other_files(mp)     ((mp)->msgflags & OTHERS)
 #define set_other_files(mp) ((mp)->msgflags |= OTHERS)
 
-#define        NULLMP  ((struct msgs *) 0)
-
 /*
  * m_getfld() message parsing
  */
@@ -381,7 +382,7 @@ typedef struct m_getfld_state *m_getfld_state_t;
 #define        MS_DEFAULT      0       /* default (one msg per file) */
 #define        MS_UNKNOWN      1       /* type not known yet         */
 #define        MS_MBOX         2       /* Unix-style "from" lines    */
-#define        MS_MMDF         3       /* string mmdlm2              */
+#define        MS_MMDF         3       /* string MMDF_DELIM          */
 
 #define        NOUSE   0               /* draft being re-used */
 
@@ -429,13 +430,6 @@ extern char *defpath;              /* pathname of user's profile      */
 extern char *ctxpath;          /* pathname of user's context      */
 extern struct node *m_defs;    /* list of profile/context entries */
 
-/* What style to use for generated Message-ID and Content-ID header
-   fields.  The localname style is pid.time@localname, where time is
-   in seconds.  The random style replaces the localname with some
-   (pseudo)random bytes and uses microsecond-resolution time. */
-int save_message_id_style (const char *);
-char *message_id (time_t, int);
-
 /*
  * These standard strings are defined in config.c.  They are the
  * only system-dependent parameters in nmh, and thus by redefining