projects
/
mmh
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Renamed r1bindex() to mhbasename(), to make its function becomes clear.
[mmh]
/
uip
/
whatnowsbr.c
diff --git
a/uip/whatnowsbr.c
b/uip/whatnowsbr.c
index
5a31a90
..
a5f8839
100644
(file)
--- 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 */
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();
/* 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 (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" */
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;
}
vecp = 0;
- vec[vecp++] = r1bindex(*ed, '/');
+ vec[vecp++] = mhbasename(*ed);
if (arg)
while (*arg)
vec[vecp++] = *arg++;
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
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;
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 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;
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 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 */
args[i++] = "-build";
/* copy any other arguments */
@@
-1292,7
+1292,7
@@
sendit(char *sp, char **arg, char *file, int pushed)
if ((pushsw = pushed))
push();
if ((pushsw = pushed))
push();
- vec[0] = r1bindex(postproc, '/');
+ vec[0] = mhbasename(postproc);
closefds(3);
if (sendsbr(vec, vecp, file, &st, 1, attach, attachformat) == OK)
closefds(3);
if (sendsbr(vec, vecp, file, &st, 1, attach, attachformat) == OK)