Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Rn bug (minor calculation error)

0 views
Skip to first unread message

Tony Birnseth

unread,
Sep 5, 1986, 6:58:28 PM9/5/86
to
Description:
When new articles arrive, rn prints a message telling the user how
many new articles have arrived. ("nn new articles have arrived!")
The count is incorrect.

Repeat by:
Wait till this event occurs and the number of new articles reported
will be the sum of the old number of articles + the new ones that
have arrived instead of the difference between the new count and
the last know high numbered article.

Fix:
The wrong variable name was used in the calculation, diffs follow.
Your rcsid and line numbers may vary.

RCS file: RCS/bits.c,v
retrieving revision 4.5
diff -r4.5 bits.c
1c1
< /* $Header: bits.c,v 4.5 86/08/19 21:48:56 tonyb Exp $
---
> /* $Header: bits.c,v 4.6 86/09/05 15:12:24 tonyb Exp $
3a4,7
> * Revision 4.6 86/09/05 15:12:24 tonyb
> * Changed variable name to correctly report the number of new
> * articles that have arrived.
> *
627c631
< (long)(lastart - firstart + 1),
---
> (long)(lastart - tmpfirst + 1),

Larry Wall

unread,
Sep 9, 1986, 7:32:42 PM9/9/86
to
System: rn version 4.3
Patch #: 31
Priority: LOW
Subject: Number of new articles arriving is miscalculated
From: to...@tektools.UUCP (Tony Birnseth) [sort of]

Description:
When new articles arrive, rn prints a message telling the user how
many new articles have arrived. ("nn new articles have arrived!")
The count is incorrect.

Repeat by:
Wait till this event occurs and the number of new articles reported
will be the sum of the old number of articles + the new ones that
have arrived instead of the difference between the new count and
the last know high numbered article.

Fix: First of all, if you applied the patch Tony sent out, unapply it.
patch -R should do what you want. Then apply the following patch.

From rn, say "| patch -d DIR", where DIR is your rn source directory.
Outside of rn, say "cd DIR; patch <thisarticle". If you don't have
the patch program, apply the following by hand, or get patch.

If patch indicates that patchlevel is the wrong version, you may need
to apply one or more previous patches, or the patch may already
have been applied. See the patchlevel file to find out what has or
has not been applied. In any event, don't continue with the patch.

Index: patchlevel
Prereq: 30
1c1
< Patch #: 30
---
> Patch #: 31

Index: bits.c
Prereq: 4.3.1.2
*** bits.c.old Tue Sep 9 16:03:37 1986
--- bits.c Tue Sep 9 16:03:50 1986
***************
*** 1,4
! /* $Header: bits.c,v 4.3.1.2 86/07/24 14:40:23 lwall Exp $
*
* $Log: bits.c,v $
* Revision 4.3.1.2 86/07/24 14:40:23 lwall

--- 1,4 -----
! /* $Header: bits.c,v 4.3.1.3 86/09/09 16:01:43 lwall Exp $
*
* $Log: bits.c,v $
* Revision 4.3.1.3 86/09/09 16:01:43 lwall
***************
*** 1,6
/* $Header: bits.c,v 4.3.1.2 86/07/24 14:40:23 lwall Exp $
*
* $Log: bits.c,v $
* Revision 4.3.1.2 86/07/24 14:40:23 lwall
* Gets host name from path instead of relay-version for news 2.10.3.
*

--- 1,9 -----
/* $Header: bits.c,v 4.3.1.3 86/09/09 16:01:43 lwall Exp $
*
* $Log: bits.c,v $
+ * Revision 4.3.1.3 86/09/09 16:01:43 lwall
+ * Fixed 'n more articles' bug.
+ *
* Revision 4.3.1.2 86/07/24 14:40:23 lwall
* Gets host name from path instead of relay-version for news 2.10.3.
*
***************
*** 621,628
IF(verbose)
sprintf(buf,
"%ld more article%s arrived--looking for more to kill...\n\n",
! (long)(lastart - firstart + 1),
! (lastart > firstart ? "s have" : " has" ) );
ELSE /* my, my, how clever we are */
#endif
#ifdef TERSE

--- 624,631 -----
IF(verbose)
sprintf(buf,
"%ld more article%s arrived--looking for more to kill...\n\n",
! (long)(lastart - tmpfirst + 1),
! (lastart > tmpfirst ? "s have" : " has" ) );
ELSE /* my, my, how clever we are */
#endif
#ifdef TERSE

0 new messages