X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/0c01170320f36b1c900ce63d6f40c5458521ba27..2d8a2d23b4c17ffb277d008f4e011fcc2bb2fa7e:/uip/mshcmds.c?ds=inline diff --git a/uip/mshcmds.c b/uip/mshcmds.c index a6847d51..f91f277a 100644 --- a/uip/mshcmds.c +++ b/uip/mshcmds.c @@ -14,8 +14,6 @@ #include #include #include -#include -#include #include #include #include @@ -1228,8 +1226,9 @@ markcmd (char **args) (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); } @@ -2614,9 +2613,10 @@ sortcmd (char **args) } 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) - Msgs[msgnum].m_stats |= CUR; + bvector_set (Msgs[msgnum].m_stats, CUR); } 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; } - 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); }