X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=uip%2Fmhtest.c;h=f6c14fbd671094eda2ff4491268bec908f803b03;hp=17ca1ab78b5e330e4dcfb1c71d6254ed22fe632b;hb=0c648c7c1509760370d4c4267a45a5a305885e7f;hpb=240013872c392fe644bd4f79382d9f5314b4ea60 diff --git a/uip/mhtest.c b/uip/mhtest.c index 17ca1ab..f6c14fb 100644 --- a/uip/mhtest.c +++ b/uip/mhtest.c @@ -12,17 +12,12 @@ #include #include #include -#include #include #include #include #include #include -#ifdef HAVE_SYS_WAIT_H -# include -#endif - static struct swit switches[] = { #define CHECKSW 0 { "check", 0 }, @@ -203,14 +198,14 @@ do_cache: 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]); - outfile = *cp == '-' ? cp : path(cp, TFILE); + outfile = *cp == '-' ? cp : getcpy(expanddir(cp)); continue; case VERBSW: @@ -228,7 +223,7 @@ do_cache: if (folder) adios(NULL, "only one folder at a time!"); else - folder = pluspath(cp); + folder = getcpy(expandfol(cp)); } else app_msgarg(&msgs, cp); } @@ -249,7 +244,7 @@ do_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, @@ -259,10 +254,7 @@ do_cache: 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!"); @@ -282,10 +274,10 @@ do_cache: ** message(s) are coming from a folder */ if (!msgs.size) - app_msgarg(&msgs, "cur"); + app_msgarg(&msgs, seq_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"); @@ -356,7 +348,7 @@ do_cache: /* 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 */