[net.news.b] rn bug #4: minor 2.10.2 incompatibility

lwall@sdcrdcf.UUCP (Larry Wall) (09/26/84)

Rn bug #4:

Subject: 2.10.2 disables checkexpired() optimization.
Index: rcln.c

Description:
	Due to abs1st[ngnum] being set earlier (because its value can come from
	the active file in news 2.10.2), checkexpired() is never being called.
	This has two effects, neither of which are fatal.  First, marking
	cross-referenced articles will take a bit longer because the average
	length of line in the .newsrc will be greater.  This also affects the
	load time of the .newsrc, and if it continues over a period of time
	can cause rn to produce .newsrc lines that are too long for readnews
	to handle (though rn will).  Second, expired articles will be reported
	as unread until the newsgroup is entered and the articles are found
	to be missing.  Neophyte news users may be discouraged by messages
	that say there are 3198 unread articles in net.flame, when in fact
	there are only 57.

Repeat-By:
	Get to a newsgroup in which you have expired but unread articles (you
	can manufacture such articles by editing your .newsrc).  Compare the
	number of unread articles mentioned on the newsgroup selection level
	with the number of unread left to read on the first line of the first
	article in the newsgroup.  The latter number should be 1 less than
	the former number.  If not, you have the problem.

Fix:	Install either the rcln.c.cpat patch by hand, or the rcln.c.epat patch
	using ed.  These files are below in shar format.

----------------------------------------------------------------------------
#!/bin/sh
echo Extracting rcln.c.cpat
cat >rcln.c.cpat <<'!STUFFY!FUNK!'
*** /tmp/,RCSt1002003	Wed Sep 26 09:32:29 1984
--- /tmp/,RCSt2002003	Wed Sep 26 09:32:35 1984
***************
*** 1,4
! /* $Header: rcln.c,v 4.1 84/09/24 12:04:36 lwall Exp $
   *
   * $Log:	rcln.c,v $
   * Revision 4.1  84/09/24  12:04:36  lwall

--- 1,4 -----
! /* $Header: rcln.c,v 4.1.1.2 84/09/25 17:20:55 lwall Exp $
   *
   * $Log:	rcln.c,v $
   * Revision 4.1.1.2  84/09/25  17:20:55  lwall
***************
*** 1,6
  /* $Header: rcln.c,v 4.1 84/09/24 12:04:36 lwall Exp $
   *
   * $Log:	rcln.c,v $
   * Revision 4.1  84/09/24  12:04:36  lwall
   * Real baseline.
   * 

--- 1,13 -----
  /* $Header: rcln.c,v 4.1.1.2 84/09/25 17:20:55 lwall Exp $
   *
   * $Log:	rcln.c,v $
+  * Revision 4.1.1.2  84/09/25  17:20:55  lwall
+  * Getting abs1st from active file before calling checkexpired caused
+  * checkexpired to not get called.
+  * 
+  * Revision 4.1.1.1  84/09/25  13:25:34  lwall
+  * Branch for sdcrdcf changes.
+  * 
   * Revision 4.1  84/09/24  12:04:36  lwall
   * Real baseline.
   * 
***************
*** 322,327
      char tmpbuf[64], *mybuf = tmpbuf;
      char *nums;
      int length;
      ART_NUM ngsize = getngsize(ngnum);
      ART_NUM unread = ngsize;
      ART_NUM newmax;

--- 329,337 -----
      char tmpbuf[64], *mybuf = tmpbuf;
      char *nums;
      int length;
+ #ifdef CACHEFIRST
+     bool virgin_ng = (!abs1st[ngnum]);
+ #endif
      ART_NUM ngsize = getngsize(ngnum);
      ART_NUM unread = ngsize;
      ART_NUM newmax;
***************
*** 336,342
  	return;
      }
  #ifdef CACHEFIRST
!     if (!abs1st[ngnum])
  #else
      if (!toread[ngnum])
  #endif

--- 346,352 -----
  	return;
      }
  #ifdef CACHEFIRST
!     if (virgin_ng)
  #else
      if (!toread[ngnum])
  #endif
!STUFFY!FUNK!
echo Extracting rcln.c.epat
sed >rcln.c.epat <<'!STUFFY!FUNK!' -e 's/X//'
X339c
X    if (virgin_ng)
X.
X324a
X#ifdef CACHEFIRST
X    bool virgin_ng = (!abs1st[ngnum]);
X#endif
X.
X3a
X * Revision 4.1.1.2  84/09/25  17:20:55  lwall
X * Getting abs1st from active file before calling checkexpired caused
X * checkexpired to not get called.
X * 
X * Revision 4.1.1.1  84/09/25  13:25:34  lwall
X * Branch for sdcrdcf changes.
X * 
X.
X1c
X/* $Header: rcln.c,v 4.1.1.2 84/09/25 17:20:55 lwall Exp $
X.
!STUFFY!FUNK!
echo ""
echo "End of kit"
: I do not append .signature, but someone might mail this.
exit