X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=uip%2Fdist.c;h=27be4a54731131e2ee663a5b6ef735675d4dd1fd;hp=89315c2cbbd8abe5a41fca824bf86136d9355ad2;hb=682962d94b21e120c78a52a8bdcb6aa994330a14;hpb=714b5c530ece27ea2835a313013f5b770163403c diff --git a/uip/dist.c b/uip/dist.c index 89315c2..27be4a5 100644 --- a/uip/dist.c +++ b/uip/dist.c @@ -53,7 +53,7 @@ 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(); @@ -108,7 +108,7 @@ main(int argc, char **argv) adios(NULL, "only one file at a time!"); if (!(cp = *argp++) || *cp == '-') adios(NULL, "missing argument to %s", argp[-2]); - file = path(cp, TFILE); + file = getcpy(expanddir(cp)); continue; case FORMSW: if (!(form = *argp++) || *form == '-') @@ -127,7 +127,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 { if (msg) adios(NULL, "only one message at a time!"); @@ -138,8 +138,6 @@ main(int argc, char **argv) cwd = getcpy(pwd()); - if (!context_find("path")) - free(path("./", TFOLDER)); if (file && (msg || folder)) adios(NULL, "can't mix files and folders/msgs"); @@ -166,8 +164,8 @@ main(int argc, char **argv) if (!msg) msg = "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"); @@ -194,7 +192,7 @@ main(int argc, char **argv) adios(msgnam, "unable to open message"); if (!file) { - context_replace(pfolder, folder); /* update current folder */ + context_replace(curfolder, folder); /* update current folder */ seq_setcur(mp, mp->lowsel); /* update current message */ seq_save(mp); /* synchronize sequences */ context_save(); /* save the context file */