+ if ((BL->gotonext) && (BL->p == 0)) {
+ /* did we come here via gotonext? lets find out whether
+ * this blog has just one blogpost with new comments just display
+ * this one.
+ */
+ struct blogpost *unread_bp = NULL;
+ int unread_count = 0;
+ while (GetNextHashPos(BL->BLOG, it, &len, &Key, &Data)) {
+ struct blogpost *one_bp = (struct blogpost *) Data;
+ if (one_bp->unread_oments > 0) {
+ unread_bp = one_bp;
+ unread_count++;
+ }
+ }
+ if (unread_count == 1) {
+ blogpost_render(unread_bp, 1);
+
+ DeleteHashPos(&it);
+ return 0;
+ }
+
+ RewindHashPos(BL->BLOG, it, 0);
+ }