- /* If the requested page number is "whichever page on which new messages start"
- * then change that to an actual page number now.
+ /* If the requested page number is -4,
+ * it means "whichever page on which msg#xxxxx starts"
+ * Change to the page number which contains that message.
+ */
+ if (BBS->requested_page == (-4)) {
+ if (BBS->num_msgs == 0) {
+ BBS->requested_page = 0;
+ }
+ else {
+ for (i=0; i<BBS->num_msgs; ++i) {
+ if (
+ (BBS->msgs[i] >= BBS->start_reading_at)
+ && (BBS->requested_page == (-4))
+ ) {
+ BBS->requested_page = (i / Stat->maxmsgs) ;
+ }
+ }
+ }
+ }
+
+ /* If the requested page number is -3,
+ * it means "whichever page on which new messages start"
+ * Change that to an actual page number now.