-/*
-Purpose
-=======
-Reads an Internet message (RFC 5322), or one or more messages stored in a
-maildrop in mbox (RFC 4155) or MMDF format, from a file stream. Each call
-to m_getfld() reads one header field, or a portion of the body, in sequence.
-
-Inputs
-======
-state: message parse state
-bufsz: maximum number of characters to load into buf
-iob: input file stream
-
-Outputs
-=======
-name: header field name (array of size NAMESZ=999)
-buf: either a header field body or message body
-bufsz: number of characters loaded into buf
-(return value): message parse state on return from function
-
-Functions
-=========
-void m_unknown(FILE *iob): Determines the message delimiter string for the
- maildrop. Called by inc, scan, and msh when reading from a maildrop file.
-
-void m_eomsbr (int (*action)(int)): Sets the hook to check for end of
- message in a maildrop. Called only by msh.
-
-Those functions save state in the State variables listed below.
-
-State variables
-===============
-m_getfld() retains state internally between calls in some state variables.
-These are used for detecting the end of each message when reading maildrops:
-static unsigned char **pat_map
-static unsigned char *fdelim
-static unsigned char *delimend
-static int fdelimlen
-static unsigned char *edelim
-static int edelimlen
-char * msg_delim
-int msg_style
-int (*eom_action)(int)
-
-Restrictions
-============
-m_getfld() is restricted to operate on one file stream at a time
-because of the retained state (see "State variables" above). And the
-first call to m_getfld() on that file stream requires that the read
-pointer be at the beginning of the file (ftell() of 0).
-
-Current usage
-=============
-The first call to m_getfld() on a file stream is with a state of FLD.
-Subsequent calls provide the state returned by the previous call.
-Therefore, given the Restrictions above, the state variable could be
-removed from the signature and just retained internally.
-*/
-