X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=uip%2Fshow.c;h=d656bf9527bde71eeb1dde83d641d4e1a70d0026;hb=b28e871ba874a53257b37eed94adfc365ed6ebf2;hp=5ab6370287182be486915eb7a66dff7e57202a11;hpb=1691e80890e5d8ba258c51c214a3e91880e1db2b;p=mmh diff --git a/uip/show.c b/uip/show.c index 5ab6370..d656bf9 100644 --- a/uip/show.c +++ b/uip/show.c @@ -49,6 +49,9 @@ static struct swit switches[] = { */ static int is_nontext(char *); +/* prototype from mhlsbr.c */ +int mhl (int, char **); + #define SHOW 0 #define NEXT 1 #define PREV 2 @@ -315,6 +318,14 @@ go_to_it: ; 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. @@ -345,6 +356,7 @@ go_to_it: ; vec[0] = r1bindex (proc, '/'); execvp (proc, vec); adios (proc, "unable to exec"); + return 0; /* dead code to satisfy the compiler */ } /*