X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=uip%2Fwhatnowproc.c;h=12cd13af70e79a7e60b314ba7a8c18f82394c254;hb=308f5a6147ab19b6cac588d1160010e89d2e6060;hp=583f133c87725874593f5b931ec43e0a8d4dca87;hpb=714b5c530ece27ea2835a313013f5b770163403c;p=mmh diff --git a/uip/whatnowproc.c b/uip/whatnowproc.c index 583f133..12cd13a 100644 --- a/uip/whatnowproc.c +++ b/uip/whatnowproc.c @@ -13,15 +13,8 @@ ** This routine is used by comp, repl, forw, and dist to exec ** the "whatnowproc". It first sets up all the environment ** variables that the "whatnowproc" will need to check, and -** then execs the command. As an optimization, if the -** "whatnowproc" is the nmh command "whatnow" (typical case), -** it will call this routine directly without exec'ing it. +** then execs the command. */ - -/* from whatnowsbr.c */ -int WhatNow(int, char **); - - int what_now(char *ed, int nedit, int use, char *file, char *altmsg, int dist, struct msgs *mp, char *text, int inplace, char *cwd) @@ -32,7 +25,7 @@ what_now(char *ed, int nedit, int use, char *file, char *altmsg, int dist, char buffer[BUFSIZ], *vec[MAXARGS]; vecp = 0; - vec[vecp++] = r1bindex(whatnowproc, '/'); + vec[vecp++] = mhbasename(whatnowproc); vec[vecp] = NULL; m_putenv("mhdraft", file); @@ -105,15 +98,6 @@ what_now(char *ed, int nedit, int use, char *file, char *altmsg, int dist, if (cwd) chdir(cwd); - /* - ** If the "whatnowproc" is the nmh command "whatnow", - ** we run it internally, rather than exec'ing it. - */ - if (strcmp(vec[0], "whatnow") == 0) { - WhatNow(vecp, vec); - done(0); - } - execvp(whatnowproc, vec); fprintf(stderr, "unable to exec "); perror(whatnowproc);