Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!dayton!ems!mark From: mark@ems.UUCP (Mark H. Colburn) Newsgroups: net.sources,net.sources.bugs Subject: Patch patch #5 Message-ID: <119@ems.UUCP> Date: Sun, 18-Jan-87 04:06:59 EST Article-I.D.: ems.119 Posted: Sun Jan 18 04:06:59 1987 Date-Received: Sun, 18-Jan-87 09:36:09 EST Sender: news@ems.UUCP Reply-To: mark@ems.UUCP (Mark H. Colburn) Distribution: world Organization: EMS/McGraw-Hill, Eden Prairie Lines: 127 Xref: mnetor net.sources:3788 net.sources.bugs:947 Ok, here it is folks. Minnesota did not appear to get patch #5 for Larry Wall's patch program. It also appears as if a lot of people out there did not receive a copy, so I am posting it. This is version has been pulled from Larry Wall's mailer daemon, so it should be official. Mark H. Colburn UUCP: {rutgers|amdahl|ihnp4}!{dayton|meccts}!ems!mark EMS/McGraw-Hill ATT: (612) 829-8200 9855 West 78th Street Eden Prairie, MN 55344 ------------------------ CUT HERE AND FORCE FEED TO PATCH --------------------- [The latest patch for patch version 2.0 is #6.] mailpatch speaking for lwall System: patch version 2.0 Patch #: 5 Priority: HIGH Subject: Patch misplaces patches when fuzz factor > 0 Authorial-Remark: OOPS. From: erix!per (Per Hedeland) Description: If a fuzz factor > 0 is used when applying a patch hunk, it will be applied (fuzz factor) lines too far into the file. Fix: Since patch_match starts checking "fuzz" lines into the patch, it must (of course) add "fuzz" to the starting point in the file as well. From rn, say "| patch -d DIR", where DIR is your patch source directory. Outside of rn, say "cd DIR; patch #define PATCHLEVEL 5 Index: patch.c Prereq: 2.0.1.1 *** patch.c.old Fri Nov 21 09:43:33 1986 *** patch.c Fri Nov 21 09:43:42 1986 *************** *** 1,5 char rcsid[] = ! "$Header: patch.c,v 2.0.1.1 86/10/29 13:10:22 lwall Exp $"; /* patch - a program to apply diffs to original files * --- 1,5 ----- char rcsid[] = ! "$Header: patch.c,v 2.0.1.2 86/11/21 09:39:15 lwall Exp $"; /* patch - a program to apply diffs to original files * *************** *** 9,14 * money off of it, or pretend that you wrote it. * * $Log: patch.c,v $ * Revision 2.0.1.1 86/10/29 13:10:22 lwall * Backwards search could terminate prematurely. * --- 9,17 ----- * money off of it, or pretend that you wrote it. * * $Log: patch.c,v $ + * Revision 2.0.1.2 86/11/21 09:39:15 lwall + * Fuzz factor caused offset of installed lines. + * * Revision 2.0.1.1 86/10/29 13:10:22 lwall * Backwards search could terminate prematurely. * *************** *** 785,791 Reg2 LINENUM iline; Reg3 LINENUM pat_lines = pch_ptrn_lines() - fuzz; ! for (iline=base+offset; pline <= pat_lines; pline++,iline++) { if (canonicalize) { if (!similar(ifetch(iline, (offset >= 0)), pfetch(pline), --- 788,794 ----- Reg2 LINENUM iline; Reg3 LINENUM pat_lines = pch_ptrn_lines() - fuzz; ! for (iline=base+offset+fuzz; pline <= pat_lines; pline++,iline++) { if (canonicalize) { if (!similar(ifetch(iline, (offset >= 0)), pfetch(pline),