#define BODYEOF 4 /* Body returned ending at eom */
#define FILEEOF 5 /* Reached end of input file */
-/*
-** Maildrop styles
-*/
-#define MS_DEFAULT 0 /* default (one msg per file) */
-#define MS_MBOX 1 /* Unix-style "from" lines */
-
-extern int msg_count; /* m_getfld() indicators */
+extern int msg_count; /* m_getfld() indicators (That's a hack!) */
#define NOUSE 0 /* draft being re-used */
static unsigned char *matchc(int, char *, int, char *);
static unsigned char *locc(int, unsigned char *, unsigned char);
-#define eom(c,iob) (msg_style == MS_MBOX && \
+#define eom(c,iob) (ismbox && \
(((c) == *msg_delim && m_Eom(c,iob)) ||\
(eom_action && (*eom_action)(c))))
*/
int msg_count = 0;
-int msg_style = MS_DEFAULT;
+int ismbox = FALSE;
/*
** The "full" delimiter string for a packed maildrop consists
cnt = ++iob->_cnt;
#endif
c = (cnt < i ? cnt : i);
- if (msg_style == MS_MBOX && c > 1) {
+ if (ismbox && c > 1) {
/*
** packed maildrop - only take up to the (possible)
** start of the next message. This "matchc" should
if (strncmp(text, "From ", 5)!=0) {
adios(NULL, "No Unix style (mbox) maildrop.");
}
- msg_style = MS_MBOX;
+ ismbox = TRUE;
delimstr = "\nFrom ";
cp = unixbuf;
while ((c = getc(iob)) != '\n' && cp - unixbuf < BUFSIZ - 1)
pos = ftell(iob);
if ((i = fread(text, sizeof *text, edelimlen, iob)) != edelimlen
|| (strncmp(text, (char *)edelim, edelimlen)!=0)) {
- if (i == 0 && msg_style == MS_MBOX)
+ if (i == 0 && ismbox)
/*
** the final newline in the (brain damaged) unix-format
** maildrop is part of the delimitter - delete it.
return 0;
}
- if (msg_style == MS_MBOX) {
+ if (ismbox) {
cp = unixbuf;
while ((c = getc(iob)) != '\n' && c >= 0 && cp - unixbuf < BUFSIZ - 1)
*cp++ = c;