X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=uip%2Fanno.c;h=36ff4b516389516f1e3b95fe90c602660f337976;hb=e711cf1c50af5e151a721f6f1690474bc9ef658d;hp=aacd82676fb533518ce56d9fa9781e852f80f3d0;hpb=c8195849d2e366c569271abb0f5f60f4ebf0b4d0;p=mmh diff --git a/uip/anno.c b/uip/anno.c index aacd826..36ff4b5 100644 --- a/uip/anno.c +++ b/uip/anno.c @@ -80,6 +80,7 @@ int main(int argc, char **argv) { int datesw = 1; + int preserve = 0; int msgnum; char *cp, *maildir; unsigned char *comp = NULL; @@ -161,28 +162,26 @@ main(int argc, char **argv) number = 1; else { - if (strcmp(*argp, "all") == 0) - number = -1; - - else if (!(number = atoi(*argp))) + if (strcmp(*argp, "all") == 0) + number = -1; + else if (!(number = atoi(*argp))) adios(NULL, "missing argument to %s", argp[-2]); - argp++; } delete = number; continue; - case APPENDSW: /* append annotations instead of default prepend */ + case APPENDSW: append = 1; continue; - case PRESERVESW: /* preserve access and modification times on annotated message */ - annopreserve(1); + case PRESERVESW: + preserve = 1; continue; - case NOPRESERVESW: /* don't preserve access and modification times on annotated message (default) */ - annopreserve(0); + case NOPRESERVESW: + preserve = 0; continue; } } @@ -225,15 +224,16 @@ main(int argc, char **argv) if (list) annolist(m_name(msgnum), comp, text, number); else - annotate(m_name(msgnum), comp, text, datesw, delete, append); + annotate(m_name(msgnum), comp, text, datesw, + delete, append, preserve); } } - context_replace(curfolder, folder); /* update current folder */ - seq_setcur(mp, mp->lowsel); /* update current message */ - seq_save(mp); /* synchronize message sequences */ - folder_free(mp); /* free folder/message structure */ - context_save(); /* save the context file */ + context_replace(curfolder, folder); + seq_setcur(mp, mp->lowsel); + seq_save(mp); + folder_free(mp); + context_save(); done(0); return 1; }