X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=uip%2Fmark.c;h=c1da64454dec00df55a28933950d8ae4f96fbe1f;hp=d56a1615f37dc73758102513a71768284b94f107;hb=5f2b39344cca1086c975d47b730929d8f1904214;hpb=097c84b61603c4a4c5837f3dcc09c30a1e751702 diff --git a/uip/mark.c b/uip/mark.c index d56a161..c1da644 100644 --- a/uip/mark.c +++ b/uip/mark.c @@ -23,13 +23,13 @@ static struct swit switches[] = { #define PUBLSW 4 { "public", 0 }, #define NPUBLSW 5 - { "nopublic", 0 }, + { "nopublic", 2 }, #define ZEROSW 6 { "zero", 0 }, #define NZEROSW 7 - { "nozero", 0 }, + { "nozero", 2 }, #define VERSIONSW 8 - { "version", 0 }, + { "Version", 0 }, #define HELPSW 9 { "help", 0 }, #define DEBUGSW 10 @@ -48,8 +48,8 @@ int main(int argc, char **argv) { int addsw = 0, deletesw = 0, debugsw = 0; - int listsw = 0, publicsw = -1, zerosw = 0; - int seqp = 0, msgnum; + int listsw = 0, publicsw = -1, zerosw = 0, msgnum; + unsigned int seqp = 0; char *cp, *maildir, *folder = NULL, buf[BUFSIZ]; char **argp, **arguments; char *seqs[NUMATTRS + 1]; @@ -134,9 +134,9 @@ main(int argc, char **argv) if (folder) adios(NULL, "only one folder at a time!"); else - folder = pluspath(cp); + folder = getcpy(expandfol(cp)); } else - app_msgarg(&msgs, cp); + app_msgarg(&msgs, cp); } /* @@ -151,13 +151,11 @@ main(int argc, char **argv) listsw++; } - if (!context_find("path")) - free(path("./", TFOLDER)); if (!msgs.size) - app_msgarg(&msgs, listsw ? "all" :"cur"); + app_msgarg(&msgs, listsw ? seq_all : 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"); @@ -223,7 +221,7 @@ main(int argc, char **argv) } seq_save(mp); /* synchronize message sequences */ - context_replace(pfolder, folder); /* update current folder */ + context_replace(curfolder, folder); /* update current folder */ context_save(); /* save the context file */ folder_free(mp); /* free folder/message structure */ done(0);