X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/0138ab0e9b1e8fa59be141338d599277095dec8c..17b9beb40640e8731143f61e3b94756f3e77d20c:/uip/sortm.c diff --git a/uip/sortm.c b/uip/sortm.c index b8dc9684..452b774a 100644 --- a/uip/sortm.c +++ b/uip/sortm.c @@ -199,7 +199,7 @@ main (int argc, char **argv) adios (maildir, "unable to change directory to"); /* read folder and create message structure */ - if (!(mp = folder_read (folder))) + if (!(mp = folder_read (folder, 1))) adios (NULL, "unable to read folder %s", folder); /* check for empty folder */ @@ -364,27 +364,24 @@ get_fields (char *datesw, int msg, struct smsg *smsg) } for (compnum = 1;;) { int bufsz = sizeof buf; - switch (state = m_getfld (&gstate, (unsigned char *) nam, - (unsigned char *) buf, &bufsz, in)) { + switch (state = m_getfld (&gstate, nam, buf, &bufsz, in)) { case FLD: case FLDPLUS: compnum++; - if (!mh_strcasecmp (nam, datesw)) { + if (!strcasecmp (nam, datesw)) { datecomp = add (buf, datecomp); while (state == FLDPLUS) { bufsz = sizeof buf; - state = m_getfld (&gstate, (unsigned char *) nam, - (unsigned char *) buf, &bufsz, in); + state = m_getfld (&gstate, nam, buf, &bufsz, in); datecomp = add (buf, datecomp); } if (!subjsort || subjcomp) break; - } else if (subjsort && !mh_strcasecmp (nam, subjsort)) { + } else if (subjsort && !strcasecmp (nam, subjsort)) { subjcomp = add (buf, subjcomp); while (state == FLDPLUS) { bufsz = sizeof buf; - state = m_getfld (&gstate, (unsigned char *) nam, - (unsigned char *) buf, &bufsz, in); + state = m_getfld (&gstate, nam, buf, &bufsz, in); subjcomp = add (buf, subjcomp); } if (datecomp) @@ -393,8 +390,7 @@ get_fields (char *datesw, int msg, struct smsg *smsg) /* just flush this guy */ while (state == FLDPLUS) { bufsz = sizeof buf; - state = m_getfld (&gstate, (unsigned char *) nam, - (unsigned char *) buf, &bufsz, in); + state = m_getfld (&gstate, nam, buf, &bufsz, in); } } continue;