X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/012d05c2b62332eb400d66b806e48216d39358c6..665dfc96:/uip/show.c?ds=inline diff --git a/uip/show.c b/uip/show.c index 5b815f4e..8ff381fb 100644 --- a/uip/show.c +++ b/uip/show.c @@ -1,5 +1,4 @@ -/* - * show.c -- show/list messages +/* show.c -- show/list messages * * This code is Copyright (c) 2002, by the authors of nmh. See the * COPYRIGHT file in the root directory of the nmh distribution for @@ -32,8 +31,8 @@ /* \ * switches for mhlproc \ */ \ - X("concat", -6, CONCATSW) \ - X("noconcat", -8, NCONCATSW) \ + X("concat", 0, CONCATSW) \ + X("noconcat", 0, NCONCATSW) \ /* \ * switches for mhshow \ */ \ @@ -96,6 +95,7 @@ main (int argc, char **argv) goto non_mhl_switches; case NHEADSW: headersw = 0; + /* FALLTHRU */ case CONCATSW: case NCONCATSW: non_mhl_switches: @@ -192,8 +192,7 @@ usage: } else { if (mode != SHOW) goto usage; - else - app_msgarg(&msgs, cp); + app_msgarg(&msgs, cp); } } @@ -259,7 +258,7 @@ usage: for (msgnum = mp->lowsel; msgnum <= mp->hghsel; msgnum++) if (is_selected(mp, msgnum)) - app_msgarg(&vec, getcpy (m_name (msgnum))); + app_msgarg(&vec, mh_xstrdup(m_name (msgnum))); seq_setcur (mp, mp->hghsel); /* update current message */ seq_save (mp); /* synchronize sequences */ @@ -368,7 +367,7 @@ is_nontext (char *msgnam) { int result, state; char *bp, *dp, *cp; - char buf[BUFSIZ], name[NAMESZ]; + char buf[NMH_BUFSIZ], name[NAMESZ]; FILE *fp; m_getfld_state_t gstate = 0; @@ -387,7 +386,7 @@ is_nontext (char *msgnam) int passno; char c; - cp = add (buf, NULL); + cp = mh_xstrdup(buf); while (state == FLDPLUS) { bufsz = sizeof buf; state = m_getfld (&gstate, name, buf, &bufsz, fp); @@ -414,7 +413,7 @@ invalid: continue; case '(': i++; - /* and fall... */ + /* FALLTHRU */ default: continue; case ')': @@ -447,7 +446,7 @@ invalid: if (*dp) { if ((result = !uprf (dp, "charset"))) goto out; - dp += sizeof("charset") - 1; + dp += LEN("charset"); while (isspace ((unsigned char) *dp)) dp++; if (*dp++ != '=') @@ -492,7 +491,7 @@ out: * Check Content-Transfer-Encoding field */ if (!strcasecmp (name, ENCODING_FIELD)) { - cp = add (buf, NULL); + cp = mh_xstrdup(buf); while (state == FLDPLUS) { bufsz = sizeof buf; state = m_getfld (&gstate, name, buf, &bufsz, fp);