X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=uip%2Fburst.c;h=0e7c53a3fc1da80f54c25ca58193d8a20ccc36a1;hb=f387b393dfab5cb5c00974b1807e8633531e0774;hp=374eff52c823b4b95aafc9f99c978cc371649dcf;hpb=714b5c530ece27ea2835a313013f5b770163403c;p=mmh diff --git a/uip/burst.c b/uip/burst.c index 374eff5..0e7c53a 100644 --- a/uip/burst.c +++ b/uip/burst.c @@ -56,7 +56,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(); @@ -107,19 +107,17 @@ main(int argc, char **argv) if (folder) adios(NULL, "only one folder at a time!"); else - folder = pluspath(cp); + folder = getcpy(expandfol(cp)); } else { msgs[msgp++] = cp; } } - if (!context_find("path")) - free(path("./", TFOLDER)); if (!msgp) msgs[msgp++] = "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"); @@ -164,7 +162,7 @@ main(int argc, char **argv) } free((char *) smsgs); - context_replace(pfolder, folder); /* update current folder */ + context_replace(curfolder, folder); /* update current folder */ /* ** If -inplace is given, then the first message burst becomes @@ -365,14 +363,14 @@ burst(struct msgs **mpp, int msgnum, struct smsg *smsgs, int numburst, if (rename(f1, f3) == NOTOK) admonish(f3, "unable to rename %s to", f1); - (void)snprintf(f3, sizeof (f3), "%s/%d", maildir, i); - ext_hook("del-hook", f3, (char *)0); + snprintf(f3, sizeof (f3), "%s/%d", maildir, i); + ext_hook("del-hook", f3, NULL); } if (rename(f2, f1) == NOTOK) admonish(f1, "unable to rename %s to", f2); - (void)snprintf(f3, sizeof (f3), "%s/%d", maildir, i); - ext_hook("add-hook", f3, (char *)0); + snprintf(f3, sizeof (f3), "%s/%d", maildir, i); + ext_hook("add-hook", f3, NULL); copy_msg_flags(mp, i, msgnum); mp->msgflags |= SEQMOD;