X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=uip%2Fmhlist.c;h=3104e6f8f7c49e1390bfc8e7e8187ee15b9efa5c;hp=92169a0abeab52d1e426045b514f635fed49303a;hb=fc71710f8695ea07d852284286b058ecb3955317;hpb=3d78b9c80a95f4e7885ed607018f9b1b9be559b4 diff --git a/uip/mhlist.c b/uip/mhlist.c index 92169a0..3104e6f 100644 --- a/uip/mhlist.c +++ b/uip/mhlist.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 }, @@ -111,7 +106,7 @@ void freects_done(int) NORETURN; /* ** static prototypes */ -static RETSIGTYPE pipeser(int); +static void pipeser(int); int @@ -219,8 +214,9 @@ do_cache: case FILESW: if (!(cp = *argp++) || (*cp == '-' && cp[1])) - adios(NULL, "missing argument to %s", argp[-2]); - file = *cp == '-' ? cp : path(cp, TFILE); + adios(NULL, "missing argument to %s", + argp[-2]); + file = *cp == '-' ? cp : getcpy(expanddir(cp)); continue; case VERBSW: @@ -238,7 +234,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); } @@ -256,7 +252,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, @@ -266,7 +262,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,17 +275,17 @@ do_cache: adios(NULL, "out of memory"); ctp = cts; - if ((ct = parse_mime(file))); + if ((ct = parse_mime(file))) *ctp++ = ct; } else { /* ** 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"); @@ -360,7 +356,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 */ @@ -371,7 +367,7 @@ do_cache: } -static RETSIGTYPE +static void pipeser(int i) { if (i == SIGQUIT) {