-#define eom(c,iob) (msg_style != MS_DEFAULT && \
- (((c) == *msg_delim && m_Eom(c,iob)) ||\
- (eom_action && (*eom_action)(c))))
-
-static unsigned char **pat_map;
-
-static int msg_style = MS_DEFAULT;
-
-/*
- * The "full" delimiter string for a packed maildrop consists
- * of a newline followed by the actual delimiter. E.g., the
- * full string for a Unix maildrop would be: "\n\nFrom ".
- * "Fdelim" points to the start of the full string and is used
- * in the BODY case of the main routine to search the buffer for
- * a possible eom. Msg_delim points to the first character of
- * the actual delim. string (i.e., fdelim+1). Edelim
- * points to the 2nd character of actual delimiter string. It
- * is used in m_Eom because the first character of the string
- * has been read and matched before m_Eom is called.
- */
-static char *msg_delim = "";
-static unsigned char *fdelim;
-static unsigned char *delimend;
-static int fdelimlen;
-static unsigned char *edelim;
-static int edelimlen;
-
-static int (*eom_action)(int) = NULL;
+#define eom(c,iob) (s->msg_style != MS_DEFAULT && \
+ (((c) == *s->msg_delim && m_Eom(c,iob)) ||\
+ (s->eom_action && (*s->eom_action)(c))))