X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=uip%2Fmhtest.c;h=7dc9c07d91d3da6319e7a44ac5f4aa2fab5872a1;hp=454fa1d43933085ca7179b9333fb7eb13070ec33;hb=27826f9353e0f0b04590b7d0f8f83e60462b90f0;hpb=3d78b9c80a95f4e7885ed607018f9b1b9be559b4 diff --git a/uip/mhtest.c b/uip/mhtest.c index 454fa1d..7dc9c07 100644 --- a/uip/mhtest.c +++ b/uip/mhtest.c @@ -12,7 +12,6 @@ #include #include #include -#include #include #include #include @@ -203,14 +202,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 +227,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 +248,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,7 +258,7 @@ do_cache: if ((cp = context_find(nmhstorage)) && *cp) tmp = concat(cp, "/", invo_name, NULL); else - tmp = add(m_maildir(invo_name), NULL); + tmp = getcpy(toabsdir(invo_name)); if (file && msgs.size) adios(NULL, "cannot specify msg and file at same time!"); @@ -279,10 +278,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(FCUR); - maildir = m_maildir(folder); + folder = getcurfol(); + maildir = toabsdir(folder); if (chdir(maildir) == NOTOK) adios(maildir, "unable to change directory to"); @@ -353,7 +352,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 */