Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!hao!oddjob!gargoyle!jpusa1!news From: news@jpusa1.UUCP (usenet) Newsgroups: comp.bugs.sys5,comp.bugs.4bsd,comp.bugs.misc Subject: Obscure bug in ci,co,rcs Message-ID: <317@jpusa1.UUCP> Date: Wed, 26-Aug-87 21:44:19 EDT Article-I.D.: jpusa1.317 Posted: Wed Aug 26 21:44:19 1987 Date-Received: Sat, 29-Aug-87 05:54:07 EDT Reply-To: stu@jpusa1.UUCP (Stu Heiss) Organization: JPUSA - Chicago, IL Lines: 46 Xref: mnetor comp.bugs.sys5:177 comp.bugs.4bsd:507 comp.bugs.misc:63 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