]> diplodocus.org Git - nmh/blobdiff - uip/mshcmds.c
Tweaked check of -outfile in test-mhstore.
[nmh] / uip / mshcmds.c
index a6847d51b03d6ce2930ce1c0fc94f8e6b4177b43..f91f277afdabd7a615fa5f22d153325901427180 100644 (file)
@@ -14,8 +14,6 @@
 #include <h/scansbr.h>
 #include <h/tws.h>
 #include <h/mts.h>
 #include <h/scansbr.h>
 #include <h/tws.h>
 #include <h/mts.h>
-#include <errno.h>
-#include <signal.h>
 #include <h/msh.h>
 #include <h/picksbr.h>
 #include <h/utils.h>
 #include <h/msh.h>
 #include <h/picksbr.h>
 #include <h/utils.h>
@@ -1228,8 +1226,9 @@ markcmd (char **args)
                        (long) Msgs[msgnum].m_start,
                        (long) Msgs[msgnum].m_stop,
                        snprintb (buf, sizeof(buf),
                        (long) Msgs[msgnum].m_start,
                        (long) Msgs[msgnum].m_stop,
                        snprintb (buf, sizeof(buf),
-                               (unsigned) mp->msgstats[msgnum - mp->lowoff],
-                               seq_bits (mp)));
+                                 (unsigned) *bvector_bits (msgstat (mp,
+                                                                     msgnum)),
+                                 seq_bits (mp)));
                    if (Msgs[msgnum].m_scanl)
                        printf ("%s", Msgs[msgnum].m_scanl);
                }                           
                    if (Msgs[msgnum].m_scanl)
                        printf ("%s", Msgs[msgnum].m_scanl);
                }                           
@@ -2614,9 +2613,10 @@ sortcmd (char **args)
        }
        else                    /* m_scaln is already NULL */
            twscopy (&Msgs[msgnum].m_tb, &tb);
        }
        else                    /* m_scaln is already NULL */
            twscopy (&Msgs[msgnum].m_tb, &tb);
-       Msgs[msgnum].m_stats = mp->msgstats[msgnum - mp->lowoff];
+       Msgs[msgnum].m_stats = bvector_create (0);
+       bvector_copy (Msgs[msgnum].m_stats, msgstat (mp, msgnum));
        if (mp->curmsg == msgnum)
        if (mp->curmsg == msgnum)
-           Msgs[msgnum].m_stats |= CUR;
+            bvector_set (Msgs[msgnum].m_stats, CUR);
     }
 
     qsort ((char *) &Msgs[mp->lowsel], mp->hghsel - mp->lowsel + 1,
     }
 
     qsort ((char *) &Msgs[mp->lowsel], mp->hghsel - mp->lowsel + 1,
@@ -2627,8 +2627,9 @@ sortcmd (char **args)
            free (Msgs[msgnum].m_scanl);        /* from subjsort */
            Msgs[msgnum].m_scanl = NULL;
        }
            free (Msgs[msgnum].m_scanl);        /* from subjsort */
            Msgs[msgnum].m_scanl = NULL;
        }
-       mp->msgstats[msgnum - mp->lowoff] = Msgs[msgnum].m_stats & ~CUR;
-       if (Msgs[msgnum].m_stats & CUR)
+       bvector_clear (Msgs[msgnum].m_stats, CUR);
+       bvector_copy (msgstat (mp, msgnum), Msgs[msgnum].m_stats);
+       if (bvector_at (Msgs[msgnum].m_stats, CUR))
            seq_setcur (mp, msgnum);
     }
            
            seq_setcur (mp, msgnum);
     }