X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=uip%2Fsortm.c;h=c56a40190be02ffc95addb58b31b092f0aebb1c0;hp=56fa7cb59a43ea3701d9534b4ecfd4e85601a17c;hb=6e9577f324bef90765a5edc02044eb111ec48072;hpb=04a3dfc70394a517a79340a7d3ecd9c6a23d0bee diff --git a/uip/sortm.c b/uip/sortm.c index 56fa7cb..c56a401 100644 --- a/uip/sortm.c +++ b/uip/sortm.c @@ -41,6 +41,8 @@ static struct swit switches[] = { { NULL, 0 } }; +char *version=VERSION; + struct smsg { int s_msg; time_t s_clock; @@ -331,6 +333,9 @@ get_fields(char *datesw, int msg, struct smsg *smsg) } for (compnum = 1, state = FLD2;; compnum++) { switch (state = m_getfld2(state, &f, in)) { + case LENERR2: + state = FLD2; + /* FALL */ case FLD2: if (mh_strcasecmp(f.name, datesw)==0) { datecomp = mh_xstrdup(f.value); @@ -350,8 +355,11 @@ get_fields(char *datesw, int msg, struct smsg *smsg) case FILEEOF2: break; - case LENERR2: case FMTERR2: + admonish(NULL, "format error in message %d (header #%d)", msg, compnum); + state = FLD2; + continue; + case IOERR2: admonish(NULL, "format error in message %d (header #%d)", msg, compnum); if (datecomp) {