home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume7 / patch2 / patch5 / text0000.txt < prev   
Encoding:
Text File  |  1986-11-30  |  3.2 KB  |  112 lines

  1. [The latest patch for patch version 2.0 is #5.]
  2.  
  3. mailpatch speaking for lwall
  4.  
  5. System: patch version 2.0
  6. Patch #: 5
  7. Priority: HIGH
  8. Subject: Patch misplaces patches when fuzz factor > 0
  9. Authorial-Remark: OOPS.
  10. From: erix!per (Per Hedeland)
  11.  
  12. Description:
  13.     If a fuzz factor > 0 is used when applying a patch hunk, it will
  14.     be applied (fuzz factor) lines too far into the file.
  15.  
  16. Fix:    Since patch_match starts checking "fuzz" lines into the patch,
  17.     it must (of course) add "fuzz" to the starting point in the
  18.     file as well.
  19.  
  20.     From rn, say "| patch -d DIR", where DIR is your patch source
  21.     directory.  Outside of rn, say "cd DIR; patch <thisarticle".
  22.     If you don't have the patch program, apply the following by hand,
  23.     or get patch.
  24.  
  25.     If patch uses a fuzz factor to apply this, you're screwed.
  26.  
  27.     If patch indicates that patchlevel is the wrong version, you may need
  28.     to apply one or more previous patches, or the patch may already
  29.     have been applied.  See the patchlevel.h file to find out what has or
  30.     has not been applied.  In any event, don't continue with the patch.
  31.  
  32.     If you are missing previous patches they can be obtained from me:
  33.  
  34.     Larry Wall
  35.     {allegra,burdvax,cbosgd,hplabs,ihnp4,sdcsvax}!sdcrdcf!lwall
  36.  
  37.     If you send a mail message of the following form it will greatly speed
  38.     processing:
  39.  
  40.     Subject: Command
  41.     @SH mailpatch PATH patch 2.0 LIST
  42.            ^ note the c
  43.  
  44.     where PATH is a return path FROM ME TO YOU in bang notation, and LIST
  45.     is the number of one or more patches you need, separated by spaces,
  46.     commas, and/or hyphens.  Saying 35- says everything from 35 to the end.
  47.     You can also get them by anonymous FTP from sdc-camarillo.arpa.
  48.  
  49. Index: patchlevel.h
  50. Prereq: 4
  51. 1c1
  52. < #define PATCHLEVEL 4
  53. ---
  54. > #define PATCHLEVEL 5
  55.  
  56. Index: patch.c
  57. Prereq: 2.0.1.1
  58. *** patch.c.old    Fri Nov 21 09:43:33 1986
  59. *** patch.c    Fri Nov 21 09:43:42 1986
  60. ***************
  61. *** 1,5
  62.   char rcsid[] =
  63. !     "$Header: patch.c,v 2.0.1.1 86/10/29 13:10:22 lwall Exp $";
  64.   
  65.   /* patch - a program to apply diffs to original files
  66.    *
  67.  
  68. --- 1,5 -----
  69.   char rcsid[] =
  70. !     "$Header: patch.c,v 2.0.1.2 86/11/21 09:39:15 lwall Exp $";
  71.   
  72.   /* patch - a program to apply diffs to original files
  73.    *
  74. ***************
  75. *** 9,14
  76.    * money off of it, or pretend that you wrote it.
  77.    *
  78.    * $Log:    patch.c,v $
  79.    * Revision 2.0.1.1  86/10/29  13:10:22  lwall
  80.    * Backwards search could terminate prematurely.
  81.    * 
  82.  
  83. --- 9,17 -----
  84.    * money off of it, or pretend that you wrote it.
  85.    *
  86.    * $Log:    patch.c,v $
  87. +  * Revision 2.0.1.2  86/11/21  09:39:15  lwall
  88. +  * Fuzz factor caused offset of installed lines.
  89. +  * 
  90.    * Revision 2.0.1.1  86/10/29  13:10:22  lwall
  91.    * Backwards search could terminate prematurely.
  92.    * 
  93. ***************
  94. *** 785,791
  95.       Reg2 LINENUM iline;
  96.       Reg3 LINENUM pat_lines = pch_ptrn_lines() - fuzz;
  97.   
  98. !     for (iline=base+offset; pline <= pat_lines; pline++,iline++) {
  99.       if (canonicalize) {
  100.           if (!similar(ifetch(iline, (offset >= 0)),
  101.                pfetch(pline),
  102.  
  103. --- 788,794 -----
  104.       Reg2 LINENUM iline;
  105.       Reg3 LINENUM pat_lines = pch_ptrn_lines() - fuzz;
  106.   
  107. !     for (iline=base+offset+fuzz; pline <= pat_lines; pline++,iline++) {
  108.       if (canonicalize) {
  109.           if (!similar(ifetch(iline, (offset >= 0)),
  110.                pfetch(pline),
  111.  
  112.