#ifdef LOCALE
setlocale(LC_ALL, "");
#endif
- invo_name = r1bindex(argv[0], '/');
+ invo_name = mhbasename(argv[0]);
/* read user profile/context */
context_read();
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 FORMSW:
if (!(form = *argp++) || *form == '-')
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!");
cwd = getcpy(pwd());
- if (!context_find("path"))
- free(path("./", TFOLDER));
if (file && (msg || folder))
adios(NULL, "can't mix files and folders/msgs");
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");
adios(msgnam, "unable to open message");
if (!file) {
- 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 */