- vec[vecp++] = "-show";
- vec[vecp] = NULL;
- }
-
- /* If the "proc" is "mhshow", add "-file" if showing file or draft.
- */
- if (strcmp (r1bindex (proc, '/'), "mhshow") == 0 && (draftsw || file) ) {
- vec[vecp] = vec[vecp - 1];
- vec[vecp - 1] = "-file";
- vec[++vecp] = NULL;
- }
-
- /*
- * If "proc" is mhl, then run it internally
- * rather than exec'ing it.
- */
- if (strcmp (r1bindex (proc, '/'), "mhl") == 0) {
- vec[0] = "mhl";
- mhl (vecp, vec);
+ /* and add -show for backward compatibility */
+ app_msgarg(&vec, "-show");
+ } else if (strcmp (r1bindex (proc, '/'), "mhshow") == 0) {
+ /* If "mhshow", add "-file" if showing file or draft. */
+ if (draftsw || file) {
+ app_msgarg(&vec, vec.msgs[vec.size - 1]);
+ vec.msgs[vec.size - 2] = "-file";
+ }
+ } else if (strcmp (r1bindex (proc, '/'), "mhl") == 0) {
+ /* If "mhl", then run it internally */
+ vec.msgs[0] = "mhl";
+ app_msgarg(&vec, NULL);
+ mhl (vec.size, vec.msgs);