# HG changeset patch
# User bears
# Date 958232319 -3600
# Node ID 22b3e3dfc8c2d31373285ef54ea0988d00f8151e
# Parent  c7df2cc65cc15411c876f44d2302838f4c989aec
[svn] Preserve gen info sometimes

diff -r c7df2cc65cc1 -r 22b3e3dfc8c2 src/content.c
--- a/src/content.c	Sat May 13 16:36:35 2000 +0100
+++ b/src/content.c	Sat May 13 16:38:39 2000 +0100
@@ -1,7 +1,7 @@
 /*
   content.c
 
-  $Id: content.c 65 2000-05-12 16:52:41Z enz $
+  $Id: content.c 81 2000-05-13 15:38:39Z bears $
 */
 
 #if HAVE_CONFIG_H
@@ -172,7 +172,7 @@
     Bool anythingWritten;
     int i;
     FILE *f;
-    const Over *ov;
+    const Over *ov, *ov_next;
 
     /* Save the overview */
     if ( ! ( f = fopen( cont.file, "w" ) ) )
@@ -185,9 +185,24 @@
     cont.first = -1;
     for ( i = 0; i < cont.size; ++i )
     {
-        if ( ( ov = cont.elem[ i ] ) )
+	ov = cont.elem[ i ];
+        if ( ov )
         {
-            if ( ! Pseudo_isGeneralInfo( Ov_msgId( ov ) ) )
+	    if ( i + 1 < cont.size )
+		ov_next = cont.elem[ i + 1 ];
+	    else
+		ov_next = NULL;
+	
+	    /*
+	      Preserve gen info if it is followed immediately by an
+	      article with the next number. In practice, this means
+	      that when in auto-subscribed mode, the gen info will
+	      remain until the 'group now subscribed' message is
+	      expired.
+	     */
+            if ( ! Pseudo_isGeneralInfo( Ov_msgId( ov ) )
+		 || ( ov_next != NULL &&
+		      Ov_numb( ov_next ) - Ov_numb( ov ) == 1 ) )
             {
                 if ( ! Ov_write( ov, f ) )
                 {