projects
/
mmh
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
We don't want to use copy() anymore; but kept it for concat() only
[mmh]
/
uip
/
repl.c
diff --git
a/uip/repl.c
b/uip/repl.c
index
6893f56
..
ff936bc
100644
(file)
--- a/
uip/repl.c
+++ b/
uip/repl.c
@@
-121,7
+121,7
@@
main(int argc, char **argv)
#ifdef LOCALE
setlocale(LC_ALL, "");
#endif
#ifdef LOCALE
setlocale(LC_ALL, "");
#endif
- invo_name = r1bindex(argv[0], '/');
+ invo_name = mhbasename(argv[0]);
/* read user profile/context */
context_read();
/* read user profile/context */
context_read();
@@
-199,8
+199,7
@@
main(int argc, char **argv)
adios(NULL, "missing argument to %s", argp[-2]);
dp = NULL;
if (*cp == '@')
adios(NULL, "missing argument to %s", argp[-2]);
dp = NULL;
if (*cp == '@')
- cp = dp = path(cp + 1,
- TSUBCWF);
+ cp = dp = getcpy(expandfol(cp));
if (fcc)
fcc = add(", ", fcc);
fcc = add(cp, fcc);
if (fcc)
fcc = add(", ", fcc);
fcc = add(cp, fcc);
@@
-213,7
+212,7
@@
main(int argc, char **argv)
adios(NULL, "only one file at a time!");
if (!(cp = *argp++) || *cp == '-')
adios(NULL, "missing argument to %s", argp[-2]);
adios(NULL, "only one file at a time!");
if (!(cp = *argp++) || *cp == '-')
adios(NULL, "missing argument to %s", argp[-2]);
- file = path(cp, TFILE);
+ file = getcpy(expanddir(cp));
continue;
case FILTSW:
if (!(cp = *argp++) || *cp == '-')
continue;
case FILTSW:
if (!(cp = *argp++) || *cp == '-')
@@
-268,7
+267,7
@@
main(int argc, char **argv)
if (folder)
adios(NULL, "only one folder at a time!");
else
if (folder)
adios(NULL, "only one folder at a time!");
else
- folder = pluspath(cp);
+ folder = getcpy(expandfol(cp));
} else {
if (msg)
adios(NULL, "only one message at a time!");
} else {
if (msg)
adios(NULL, "only one message at a time!");
@@
-286,13
+285,11
@@
main(int argc, char **argv)
cwd = getcpy(pwd());
cwd = getcpy(pwd());
- if (!context_find("path"))
- free(path("./", TFOLDER));
if (file && (msg || folder))
adios(NULL, "can't mix files and folders/msgs");
#ifdef MHE
if (file && (msg || folder))
adios(NULL, "can't mix files and folders/msgs");
#ifdef MHE
- strncpy(drft, buildsw ? m_maildir("reply")
+ strncpy(drft, buildsw ? toabsdir("reply")
: m_draft("new"), sizeof(drft));
#else
strncpy(drft, m_draft("new"), sizeof(drft));
: m_draft("new"), sizeof(drft));
#else
strncpy(drft, m_draft("new"), sizeof(drft));
@@
-310,8
+307,8
@@
main(int argc, char **argv)
if (!msg)
msg = "cur";
if (!folder)
if (!msg)
msg = "cur";
if (!folder)
- folder = getfolder(1);
- maildir = m_maildir(folder);
+ folder = getcurfol();
+ maildir = toabsdir(folder);
if (chdir(maildir) == NOTOK)
adios(maildir, "unable to change directory to");
if (chdir(maildir) == NOTOK)
adios(maildir, "unable to change directory to");
@@
-332,7
+329,7
@@
main(int argc, char **argv)
if (mp->numsel > 1)
adios(NULL, "only one message at a time!");
if (mp->numsel > 1)
adios(NULL, "only one message at a time!");
- context_replace(pfolder, folder); /* update current folder */
+ context_replace(curfolder, folder); /* update current folder */
seq_setcur(mp, mp->lowsel); /* update current message */
seq_save(mp); /* synchronize sequences */
context_save(); /* save the context file */
seq_setcur(mp, mp->lowsel); /* update current message */
seq_save(mp); /* synchronize sequences */
context_save(); /* save the context file */