X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=uip%2Fwhatnowsbr.c;h=032566e2291f28d857b44db1024355129467e988;hb=246ca516a0f7b870316116bc184347b0fb2bc00b;hp=5a31a903ee05d2907dd6817185bc99faa342a0c9;hpb=714b5c530ece27ea2835a313013f5b770163403c;p=mmh diff --git a/uip/whatnowsbr.c b/uip/whatnowsbr.c index 5a31a90..032566e 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(); @@ -301,7 +301,7 @@ WhatNow(int argc, char **argv) */ if (*(argp+1) == (char *)0) { - (void)sprintf(buf, "$SHELL -c \"cd;pwd\""); + sprintf(buf, "$SHELL -c \"cd;pwd\""); } else { writesomecmd(buf, BUFSIZ, "cd", "pwd", argp); } @@ -333,7 +333,7 @@ WhatNow(int argc, char **argv) ** accustomed to. */ writelscmd(buf, sizeof(buf), argp); - (void)system_in_dir(cwd, buf); + system_in_dir(cwd, buf); break; case ALISTCMDSW: @@ -483,7 +483,7 @@ WhatNow(int argc, char **argv) if (atoi(*argp) == 1) *argp = ""; else - (void)sprintf(*argp, "%d", atoi(*argp) - 1); + sprintf(*argp, "%d", atoi(*argp) - 1); } } } @@ -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)