]> diplodocus.org Git - nmh/blobdiff - uip/refile.c
inc/test-eom-align: rm(1) unwanted +inbox emails, not rmm(1).
[nmh] / uip / refile.c
index ec539013ee170fcc73fca00b007c6579e85b24aa..be1294fe0c35c1e8d12c3fa32d622ac778a69695 100644 (file)
@@ -7,7 +7,10 @@
  */
 
 #include <h/mh.h>
+#include "h/done.h"
 #include <h/utils.h>
+#include "sbr/m_maildir.h"
+#include "sbr/m_mktemp.h"
 #include <fcntl.h>
 
 #define REFILE_SWITCHES \
@@ -310,7 +313,7 @@ opnfolds (struct msgs *src_folder, struct st_fold *folders, int nfolders)
 
 
 /*
- * Set the Previous-Sequence and then sychronize the
+ * Set the Previous-Sequence and then synchronize the
  * sequence file, for each destination folder.
  */
 
@@ -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);
            }
        }
     }