X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=uip%2Frcvstore.c;h=04b62d85ca4b6ff41a8c9d79ef24c06c9d74e829;hp=868ed47b111702875102385647599aec9dc071d8;hb=27826f9353e0f0b04590b7d0f8f83e60462b90f0;hpb=714b5c530ece27ea2835a313013f5b770163403c diff --git a/uip/rcvstore.c b/uip/rcvstore.c index 868ed47..04b62d8 100644 --- a/uip/rcvstore.c +++ b/uip/rcvstore.c @@ -11,7 +11,6 @@ #include #include #include -#include static struct swit switches[] = { #define CRETSW 0 @@ -63,12 +62,11 @@ main(int argc, char **argv) #ifdef LOCALE setlocale(LC_ALL, ""); #endif - invo_name = r1bindex(argv[0], '/'); + invo_name = mhbasename(argv[0]); /* read user profile/context */ context_read(); - mts_init(invo_name); arguments = getarguments(invo_name, argc, argv, 1); argp = arguments; @@ -135,7 +133,7 @@ main(int argc, char **argv) if (folder) adios(NULL, "only one folder at a time!"); else - folder = pluspath(cp); + folder = getcpy(expandfol(cp)); } else { adios(NULL, "usage: %s [+folder] [switches]", invo_name); @@ -144,13 +142,10 @@ main(int argc, char **argv) seqs[seqp] = NULL; /* NULL terminate list of sequences */ - if (!context_find("path")) - free(path("./", TFOLDER)); - /* if no folder is given, use default folder */ if (!folder) - folder = getfolder(0); - maildir = m_maildir(folder); + folder = getdeffol(); + maildir = toabsdir(folder); /* check if folder exists */ if (stat(maildir, &st) == NOTOK) { @@ -205,8 +200,8 @@ main(int argc, char **argv) ** Link message into folder, and possibly add ** to the Unseen-Sequence's. */ - if ((msgnum = folder_addmsg(&mp, tmpfilenam, 0, unseensw, 0, 0, - (char *)0)) == -1) + if ((msgnum = folder_addmsg(&mp, tmpfilenam, 0, unseensw, 0, 0, NULL)) + == -1) done(1); /* @@ -218,7 +213,7 @@ main(int argc, char **argv) done(1); } - seq_setunseen(mp, 0); /* synchronize any Unseen-Sequence's */ + seq_setunseen(mp, 1); /* add new msgs to unseen sequences */ seq_save(mp); /* synchronize and save message sequences */ folder_free(mp); /* free folder/message structure */