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();
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" */
}
vecp = 0;
- vec[vecp++] = r1bindex(*ed, '/');
+ vec[vecp++] = mhbasename(*ed);
if (arg)
while (*arg)
vec[vecp++] = *arg++;
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;
** 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;
** 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 */
if ((pushsw = pushed))
push();
- vec[0] = r1bindex(postproc, '/');
+ vec[0] = mhbasename(postproc);
closefds(3);
if (sendsbr(vec, vecp, file, &st, 1, attach, attachformat) == OK)