- for (compnum = 1, state = FLD;;) {
- switch (state = m_getfld (state, nam, buf, sizeof(buf), in)) {
- case FLD:
- case FLDEOF:
- case FLDPLUS:
- compnum++;
- if (!mh_strcasecmp (nam, datesw)) {
- datecomp = add (buf, datecomp);
- while (state == FLDPLUS) {
- state = m_getfld (state, nam, buf,
- sizeof(buf), in);
- datecomp = add (buf, datecomp);
- }
- if (!subjsort || subjcomp)
+ 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);
+ if (!subjsort || subjcomp) {