seq_read and seq_list also recognise msg which don't exist
[mmh] / sbr / seq_list.c
index 3606f6f..ce23c22 100644 (file)
@@ -54,12 +54,9 @@ seq_list(struct msgs *mp, char *seqname)
 
        bp = buffer;
 
-       for (i = mp->lowmsg; i <= mp->hghmsg; ++i) {
-               /*
-               ** If message doesn't exist, or isn't in
-               ** the sequence, then continue.
-               */
-               if (!does_exist(mp, i) || !in_sequence(mp, seqnum, i))
+       for (i = mp->lowoff; i <= mp->hghoff; ++i) {
+               /* If message isn't in the sequence, then continue */
+               if (!in_sequence(mp, seqnum, i))
                        continue;
 
                /*
@@ -91,8 +88,7 @@ seq_list(struct msgs *mp, char *seqname)
                /*
                ** Scan to the end of this message range
                */
-               for (++i; i <= mp->hghmsg && does_exist(mp, i) &&
-                               in_sequence(mp, seqnum, i); ++i)
+               for (++i; i <= mp->hghoff && in_sequence(mp, seqnum, i); ++i)
                        ;
 
                if (i - j > 1) {