X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=uip%2Fwhatnowsbr.c;h=a5f8839906f20742134f1998ad00b6ecfa56a20b;hp=5a31a903ee05d2907dd6817185bc99faa342a0c9;hb=240013872c392fe644bd4f79382d9f5314b4ea60;hpb=c20b4fa14515c7ab388ce35411d89a7a92300711 diff --git a/uip/whatnowsbr.c b/uip/whatnowsbr.c index 5a31a90..a5f8839 100644 --- a/uip/whatnowsbr.c +++ b/uip/whatnowsbr.c @@ -136,7 +136,7 @@ WhatNow(int argc, char **argv) char *l; /* set on -l to alist command */ int n; /* set on -n to alist command */ - invo_name = r1bindex(argv[0], '/'); + invo_name = mhbasename(argv[0]); /* read user profile/context */ context_read(); @@ -651,7 +651,7 @@ editfile(char **ed, char **arg, char *file, int use, struct msgs *mp, if (reedit) { if (!*ed) { /* no explicit editor */ *ed = edsave; /* so use the previous one */ - if ((cp = r1bindex(*ed, '/')) == NULL) + if ((cp = mhbasename(*ed)) == NULL) cp = *ed; /* unless we've specified it via "editor-next" */ @@ -719,7 +719,7 @@ editfile(char **ed, char **arg, char *file, int use, struct msgs *mp, } vecp = 0; - vec[vecp++] = r1bindex(*ed, '/'); + vec[vecp++] = mhbasename(*ed); if (arg) while (*arg) vec[vecp++] = *arg++; @@ -734,7 +734,7 @@ editfile(char **ed, char **arg, char *file, int use, struct msgs *mp, default: if ((status = pidwait(pid, NOTOK))) { #ifdef ATTVIBUG - if ((cp = r1bindex(*ed, '/')) && + if ((cp = mhbasename(*ed)) && strcmp(cp, "vi") == 0 && (status & 0x00ff) == 0) status = 0; @@ -845,7 +845,7 @@ sendfile(char **arg, char *file, int pushsw) ** If the sendproc is the nmh command `send', then we call ** those routines directly rather than exec'ing the command. */ - if (strcmp(sp = r1bindex(sendproc, '/'), "send") == 0) { + if (strcmp(sp = mhbasename(sendproc), "send") == 0) { cp = invo_name; sendit(invo_name = sp, arg, file, pushsw); invo_name = cp; @@ -909,7 +909,7 @@ buildfile(char **argp, char *file) ** if we are using mhn as buildmimeproc */ i = 0; - if (strcmp(r1bindex(ed, '/'), "mhn") == 0) + if (strcmp(mhbasename(ed), "mhn") == 0) args[i++] = "-build"; /* copy any other arguments */ @@ -1292,7 +1292,7 @@ sendit(char *sp, char **arg, char *file, int pushed) if ((pushsw = pushed)) push(); - vec[0] = r1bindex(postproc, '/'); + vec[0] = mhbasename(postproc); closefds(3); if (sendsbr(vec, vecp, file, &st, 1, attach, attachformat) == OK)