]> diplodocus.org Git - nmh/blobdiff - uip/refile.c
Make viamail read the user's profile; this is required because sendsbr()
[nmh] / uip / refile.c
index 205041e0501fab4edce906dab6eebd6aab506aa0..19e12661a1bd16cabd3611a250204abeec15fcb2 100644 (file)
@@ -11,7 +11,6 @@
 #include <h/mh.h>
 #include <h/utils.h>
 #include <fcntl.h>
-#include <errno.h>
 
 #define REFILE_SWITCHES \
     X("draft", 0, DRAFTSW) \
@@ -174,11 +173,6 @@ main (int argc, char **argv)
     if (foldp == 0)
        adios (NULL, "no folder specified");
 
-#ifdef WHATNOW
-    if (!msgs.size && !foldp && !filep && (cp = getenv ("mhdraft")) && *cp)
-       files[filep++] = cp;
-#endif /* WHATNOW */
-
     /*
      * We are refiling a file to the folders
      */
@@ -385,11 +379,13 @@ static void
 copy_seqs (struct msgs *oldmp, int oldmsgnum, struct msgs *newmp, int newmsgnum)
 {
     char **seq;
-    int seqnum;
+    size_t seqnum;
 
-    for (seq = oldmp->msgattrs, seqnum = 0; *seq; ++seq, ++seqnum) {
+    for (seq = svector_strs (oldmp->msgattrs), seqnum = 0;
+        *seq && seqnum < svector_size (oldmp->msgattrs);
+        ++seq, ++seqnum) {
        if (strcmp (current, *seq)) {
-           assert (seqnum == seq_getnum (oldmp, *seq));
+           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);