X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=uip%2Fwhatnowsbr.c;h=86878154f392d2c25321d7da005b6a1a3a62ba1f;hp=5a31a903ee05d2907dd6817185bc99faa342a0c9;hb=d39e2c447b0d163a5a63f480b23d06edb7a73aa0;hpb=714b5c530ece27ea2835a313013f5b770163403c diff --git a/uip/whatnowsbr.c b/uip/whatnowsbr.c index 5a31a90..8687815 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 */ @@ -1126,7 +1126,7 @@ sendit(char *sp, char **arg, char *file, int pushed) vecp = 1; /* we'll get the zero'th element later */ vec[vecp++] = "-library"; - vec[vecp++] = getcpy(m_maildir("")); + vec[vecp++] = getcpy(toabsdir("+")); while ((cp = *argp++)) { if (*cp == '-') { @@ -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)