X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/9514ca81bd12a47df977822efc14ff285bd5bc10..88252e1518937b911fa01c27efabd67b0e0e3e57:/uip/refile.c diff --git a/uip/refile.c b/uip/refile.c index 05a533e2..3035f2c6 100644 --- a/uip/refile.c +++ b/uip/refile.c @@ -7,7 +7,10 @@ */ #include +#include "h/done.h" #include +#include "sbr/m_maildir.h" +#include "sbr/m_mktemp.h" #include #define REFILE_SWITCHES \ @@ -132,7 +135,7 @@ main (int argc, char **argv) if (filep > NFOLDERS) adios (NULL, "only %d files allowed!", NFOLDERS); isdf = 0; - files[filep++] = getcpy (m_draft (NULL, NULL, 1, &isdf)); + files[filep++] = mh_xstrdup(m_draft(NULL, NULL, 1, &isdf)); continue; case FILESW: if (filep > NFOLDERS) @@ -382,7 +385,7 @@ m_file (struct msgs *mp, char *msgfile, int oldmsgnum, * therefore won't be assigned to be the current message. */ if ((msgnum = folder_addmsg (&fp->f_mp, msgfile, - mp == fp->f_mp ? 0 : 1, + mp != fp->f_mp, 0, preserve, nfolders == 1 && refile, maildir)) == -1) return 1; @@ -409,7 +412,7 @@ copy_seqs (struct msgs *oldmp, int oldmsgnum, struct msgs *newmp, int newmsgnum) assert ((int) seqnum == seq_getnum (oldmp, *seq)); if (in_sequence (oldmp, seqnum, oldmsgnum)) { seq_addmsg (newmp, *seq, newmsgnum, - is_seq_private (oldmp, seqnum) ? 0 : 1, 0); + !is_seq_private (oldmp, seqnum), 0); } } }