X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/aad5d20016b28bb8c28592c1ebe4213aafaa43c3..ef1ba39e8dae81091b6c3e73e72825ef6edea3c6:/uip/show.c?ds=inline diff --git a/uip/show.c b/uip/show.c index f8910785..25ed7573 100644 --- a/uip/show.c +++ b/uip/show.c @@ -32,8 +32,17 @@ /* \ * switches for mhlproc \ */ \ - X("concat", -6, CONCATSW) \ - X("noconcat", -8, NCONCATSW) \ + X("concat", 0, CONCATSW) \ + X("noconcat", 0, NCONCATSW) \ + /* \ + * switches for mhshow \ + */ \ + X("part number", 0, PARTSW) \ + X("type content", 0, TYPESW) \ + X("prefer content", 0, PREFERSW) \ + X("markform file", 0, MARKFORMSW) \ + X("rcache policy", 0, RCACHESW) \ + X("wcache policy", 0, WCACHESW) \ #define X(sw, minchars, id) id, DEFINE_SWITCH_ENUM(SHOW); @@ -141,6 +150,12 @@ usage: case LENSW: case WIDTHSW: case FMTPROCSW: + case PARTSW: + case TYPESW: + case PREFERSW: + case MARKFORMSW: + case RCACHESW: + case WCACHESW: app_msgarg(&vec, --cp); if (!(cp = *argp++) || *cp == '-') adios (NULL, "missing argument to %s", argp[-2]); @@ -177,8 +192,7 @@ usage: } else { if (mode != SHOW) goto usage; - else - app_msgarg(&msgs, cp); + app_msgarg(&msgs, cp); } } @@ -244,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 */ @@ -432,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++ != '=')