projects
/
mmh
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Removed absolute path from mailproc.
[mmh]
/
uip
/
mhtest.c
diff --git
a/uip/mhtest.c
b/uip/mhtest.c
index
621c701
..
7dc9c07
100644
(file)
--- a/
uip/mhtest.c
+++ b/
uip/mhtest.c
@@
-12,7
+12,6
@@
#include <h/md5.h>
#include <errno.h>
#include <signal.h>
#include <h/md5.h>
#include <errno.h>
#include <signal.h>
-#include <h/mts.h>
#include <h/tws.h>
#include <h/mime.h>
#include <h/mhparse.h>
#include <h/tws.h>
#include <h/mime.h>
#include <h/mhparse.h>
@@
-127,7
+126,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();
@@
-203,14
+202,14
@@
do_cache:
if (!(cp = *argp++) || (*cp == '-' && cp[1]))
adios(NULL, "missing argument to %s",
argp[-2]);
if (!(cp = *argp++) || (*cp == '-' && cp[1]))
adios(NULL, "missing argument to %s",
argp[-2]);
- file = *cp == '-' ? cp : path(cp, TFILE);
+ file = *cp == '-' ? cp : getcpy(expanddir(cp));
continue;
case OUTFILESW:
if (!(cp = *argp++) || (*cp == '-' && cp[1]))
adios(NULL, "missing argument to %s",
argp[-2]);
continue;
case OUTFILESW:
if (!(cp = *argp++) || (*cp == '-' && cp[1]))
adios(NULL, "missing argument to %s",
argp[-2]);
- outfile = *cp == '-' ? cp : path(cp, TFILE);
+ outfile = *cp == '-' ? cp : getcpy(expanddir(cp));
continue;
case VERBSW:
continue;
case VERBSW:
@@
-228,7
+227,7
@@
do_cache:
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
app_msgarg(&msgs, cp);
}
} else
app_msgarg(&msgs, cp);
}
@@
-249,7
+248,7
@@
do_cache:
/* Check for private cache location */
if (!(cache_private = context_find(nmhprivcache)))
cache_private = ".cache";
/* Check for private cache location */
if (!(cache_private = context_find(nmhprivcache)))
cache_private = ".cache";
- cache_private = getcpy(m_maildir(cache_private));
+ cache_private = getcpy(toabsdir(cache_private));
/*
** Check for storage directory. If specified,
/*
** Check for storage directory. If specified,
@@
-259,10
+258,7
@@
do_cache:
if ((cp = context_find(nmhstorage)) && *cp)
tmp = concat(cp, "/", invo_name, NULL);
else
if ((cp = context_find(nmhstorage)) && *cp)
tmp = concat(cp, "/", invo_name, NULL);
else
- tmp = add(m_maildir(invo_name), NULL);
-
- if (!context_find("path"))
- free(path("./", TFOLDER));
+ tmp = getcpy(toabsdir(invo_name));
if (file && msgs.size)
adios(NULL, "cannot specify msg and file at same time!");
if (file && msgs.size)
adios(NULL, "cannot specify msg and file at same time!");
@@
-282,10
+278,10
@@
do_cache:
** message(s) are coming from a folder
*/
if (!msgs.size)
** message(s) are coming from a folder
*/
if (!msgs.size)
- app_msgarg(&msgs, "cur");
+ app_msgarg(&msgs, seq_cur);
if (!folder)
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");
@@
-356,7
+352,7
@@
do_cache:
/* If reading from a folder, do some updating */
if (mp) {
/* If reading from a folder, do some updating */
if (mp) {
- context_replace(pfolder, folder); /* update current folder */
+ context_replace(curfolder, folder); /* update current folder */
seq_setcur(mp, mp->hghsel); /* update current message */
seq_save(mp); /* synchronize sequences */
context_save(); /* save the context file */
seq_setcur(mp, mp->hghsel); /* update current message */
seq_save(mp); /* synchronize sequences */
context_save(); /* save the context file */