X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/fe4026749648d3f5693adce7ae7a218968a9beb5..63621a81d16ab743de6b57d47578a9a2c670ad22:/uip/show.c diff --git a/uip/show.c b/uip/show.c index d5afcad1..86e8e5b5 100644 --- a/uip/show.c +++ b/uip/show.c @@ -8,6 +8,7 @@ #include #include #include +#include "sbr/m_maildir.h" #define SHOW_SWITCHES \ X("checkmime", 0, CHECKMIMESW) \ @@ -187,8 +188,7 @@ usage: if (*cp == '+' || *cp == '@') { if (folder) adios (NULL, "only one folder at a time!"); - else - folder = pluspath (cp); + folder = pluspath (cp); } else { if (mode != SHOW) goto usage; @@ -369,14 +369,14 @@ is_nontext (char *msgnam) char *bp, *dp, *cp; char buf[NMH_BUFSIZ], name[NAMESZ]; FILE *fp; - m_getfld_state_t gstate = 0; + m_getfld_state_t gstate; if ((fp = fopen (msgnam, "r")) == NULL) return 0; - + gstate = m_getfld_state_init(fp); for (;;) { int bufsz = sizeof buf; - switch (state = m_getfld (&gstate, name, buf, &bufsz, fp)) { + switch (state = m_getfld2(&gstate, name, buf, &bufsz)) { case FLD: case FLDPLUS: /* @@ -389,7 +389,7 @@ is_nontext (char *msgnam) cp = mh_xstrdup(buf); while (state == FLDPLUS) { bufsz = sizeof buf; - state = m_getfld (&gstate, name, buf, &bufsz, fp); + state = m_getfld2(&gstate, name, buf, &bufsz); cp = add (buf, cp); } bp = cp; @@ -413,7 +413,7 @@ invalid: continue; case '(': i++; - /* FALLTHRU */ + continue; default: continue; case ')': @@ -494,7 +494,7 @@ out: cp = mh_xstrdup(buf); while (state == FLDPLUS) { bufsz = sizeof buf; - state = m_getfld (&gstate, name, buf, &bufsz, fp); + state = m_getfld2(&gstate, name, buf, &bufsz); cp = add (buf, cp); } for (bp = cp; isspace ((unsigned char) *bp); bp++) @@ -521,7 +521,7 @@ out: */ while (state == FLDPLUS) { bufsz = sizeof buf; - state = m_getfld (&gstate, name, buf, &bufsz, fp); + state = m_getfld2(&gstate, name, buf, &bufsz); } break;