projects
/
mmh
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Replaced msg_style with the boolean ismbox.
[mmh]
/
sbr
/
m_getfld.c
diff --git
a/sbr/m_getfld.c
b/sbr/m_getfld.c
index
5dd6973
..
cefedec
100644
(file)
--- a/
sbr/m_getfld.c
+++ b/
sbr/m_getfld.c
@@
-144,7
+144,7
@@
static int m_Eom(int, FILE *);
static unsigned char *matchc(int, char *, int, char *);
static unsigned char *locc(int, unsigned char *, unsigned char);
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))))
(((c) == *msg_delim && m_Eom(c,iob)) ||\
(eom_action && (*eom_action)(c))))
@@
-157,7
+157,7
@@
static unsigned char **pat_map;
*/
int msg_count = 0;
*/
int msg_count = 0;
-int msg_style = MS_DEFAULT;
+int ismbox = FALSE;
/*
** The "full" delimiter string for a packed maildrop consists
/*
** The "full" delimiter string for a packed maildrop consists
@@
-505,7
+505,7
@@
m_getfld(int state, unsigned char *name, unsigned char *buf,
cnt = ++iob->_cnt;
#endif
c = (cnt < i ? cnt : i);
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
/*
** packed maildrop - only take up to the (possible)
** start of the next message. This "matchc" should
@@
-642,7
+642,7
@@
m_unknown(FILE *iob)
if (strncmp(text, "From ", 5)!=0) {
adios(NULL, "No Unix style (mbox) maildrop.");
}
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)
delimstr = "\nFrom ";
cp = unixbuf;
while ((c = getc(iob)) != '\n' && cp - unixbuf < BUFSIZ - 1)
@@
-689,7
+689,7
@@
m_Eom(int c, FILE *iob)
pos = ftell(iob);
if ((i = fread(text, sizeof *text, edelimlen, iob)) != edelimlen
|| (strncmp(text, (char *)edelim, edelimlen)!=0)) {
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.
/*
** the final newline in the (brain damaged) unix-format
** maildrop is part of the delimitter - delete it.
@@
-701,7
+701,7
@@
m_Eom(int c, FILE *iob)
return 0;
}
return 0;
}
- if (msg_style == MS_MBOX) {
+ if (ismbox) {
cp = unixbuf;
while ((c = getc(iob)) != '\n' && c >= 0 && cp - unixbuf < BUFSIZ - 1)
*cp++ = c;
cp = unixbuf;
while ((c = getc(iob)) != '\n' && c >= 0 && cp - unixbuf < BUFSIZ - 1)
*cp++ = c;