Thread View: comp.bugs.sys5
2 messages
2 total messages
Started by usenet
Thu, 27 Aug 1987 01:44
Obscure bug in ci,co,rcs
Author: usenet
Date: Thu, 27 Aug 1987 01:44
Date: Thu, 27 Aug 1987 01:44
46 lines
1871 bytes
1871 bytes
An obscure bug surfaced when trying to co a bunch of
files. The variable 'linecorr' is not initialized to
0 for each file. This will cause editstring to break
if linecorr happened to be < 0 at the end of doing the
last file. Following are diffs to rcs.c and rcsgen.c
*** /tmp/,RCSt1a11512 Wed Aug 26 19:06:54 1987
--- rcs.c Wed Aug 26 18:45:44 1987
***************
*** 504,509
/* no revision deleted */
fastcopy(finptr,frewrite);
} else {
if ( cuttail )
buildeltatext(gendeltas);
else
--- 504,510 -----
/* no revision deleted */
fastcopy(finptr,frewrite);
} else {
+ extern int linecorr; linecorr = 0;
if ( cuttail )
buildeltatext(gendeltas);
else
*** /tmp/,RCSt1a11526 Wed Aug 26 19:08:47 1987
--- rcsgen.c Wed Aug 26 18:47:37 1987
***************
*** 94,99
*/
{
int i;
if (deltas[0]==target) {
/* only latest revision to generate */
--- 94,100 -----
*/
{
int i;
+ extern int linecorr; linecorr = 0;
if (deltas[0]==target) {
/* only latest revision to generate */
--
Stu Heiss {gargoyle,ihnp4}!jpusa1!stu
Re: Obscure bug in ci,co,rcs
Author: Roy Morris
Date: Thu, 03 Sep 1987 20:13
Date: Thu, 03 Sep 1987 20:13
16 lines
1249 bytes
1249 bytes
In article <317@jpusa1.UUCP> stu@jpusa1.UUCP (Stu Heiss) writes: >An obscure bug surfaced when trying to co a bunch of >files. The variable 'linecorr' is not initialized to >0 for each file. This will cause editstring to break >if linecorr happened to be < 0 at the end of doing the >last file. Following are diffs to rcs.c and rcsgen.c A cleaner fix to the problem is to add the following line to the routine initeditfiles() in rcsedit.c. We weren't bitten by the variable 'editline' not being initialized, but it's not worth waiting to see if it happens. 88a89 > editline = linecorr = 0; Roy Morris FileNet Corp ...!felix!roy
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads