home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / unix / volume7 / patch2 / patch1 < prev    next >
Text File  |  1986-11-30  |  3KB  |  89 lines

  1. /* Written  6:24 pm  Oct 29, 1986 by lwall@sdcrdcf.UUCP in mirror:net.sources.bu */
  2. /* ---------- "patch 2.0 patch #1" ---------- */
  3. System: patch version 2.0
  4. Patch #: 1
  5. Priority: MEDIUM
  6. Subject: Backwards scan for place to insert hunk can give up prematurely
  7. From: dorab@ucla-cs.uucp (Dorab Patel)
  8.  
  9. Description:
  10.     Under certain circumstances patch can fail to find the correct
  11.     location to install a hunk.  If the proper place to insert a hunk
  12.     is more lines backwards than the number of lines left in the input
  13.     file from the place it first starts searching from, patch gives up
  14.     because of a more-or-less typographical error.
  15.  
  16. Fix:    From rn, say "| patch -d DIR", where DIR is your patch source
  17.     directory.  Outside of rn, say "cd DIR; patch <thisarticle".
  18.     If you don't have the patch program, apply the following by hand,
  19.     or get patch.
  20.  
  21.     If patch indicates that patchlevel is the wrong version, you may need
  22.     to apply one or more previous patches, or the patch may already
  23.     have been applied.  See the patchlevel.h file to find out what has or
  24.     has not been applied.  In any event, don't continue with the patch.
  25.  
  26. Index: patchlevel.h
  27. Prereq: 0
  28. 1c1
  29. < #define PATCHLEVEL 0
  30. ---
  31. > #define PATCHLEVEL 1
  32.  
  33. Index: patch.c
  34. Prereq: 2.0
  35. *** patch.c.old    Wed Oct 29 13:50:40 1986
  36. *** patch.c    Wed Oct 29 13:50:45 1986
  37. ***************
  38. *** 1,5
  39.   char rcsid[] =
  40. !     "$Header: patch.c,v 2.0 86/09/17 15:37:32 lwall Exp $";
  41.   
  42.   /* patch - a program to apply diffs to original files
  43.    *
  44.  
  45. --- 1,5 -----
  46.   char rcsid[] =
  47. !     "$Header: patch.c,v 2.0.1.1 86/10/29 13:10:22 lwall Exp $";
  48.   
  49.   /* patch - a program to apply diffs to original files
  50.    *
  51. ***************
  52. *** 9,14
  53.    * money off of it, or pretend that you wrote it.
  54.    *
  55.    * $Log:    patch.c,v $
  56.    * Revision 2.0  86/09/17  15:37:32  lwall
  57.    * Baseline for netwide release.
  58.    * 
  59.  
  60. --- 9,17 -----
  61.    * money off of it, or pretend that you wrote it.
  62.    *
  63.    * $Log:    patch.c,v $
  64. +  * Revision 2.0.1.1  86/10/29  13:10:22  lwall
  65. +  * Backwards search could terminate prematurely.
  66. +  * 
  67.    * Revision 2.0  86/09/17  15:37:32  lwall
  68.    * Baseline for netwide release.
  69.    * 
  70. ***************
  71. *** 454,460
  72.       return first_guess;
  73.       for (offset = 1; ; offset++) {
  74.       Reg5 bool check_after = (offset <= max_pos_offset);
  75. !     Reg6 bool check_before = (offset <= max_pos_offset);
  76.   
  77.       if (check_after && patch_match(first_guess, offset, fuzz)) {
  78.   #ifdef DEBUGGING
  79.  
  80. --- 457,463 -----
  81.       return first_guess;
  82.       for (offset = 1; ; offset++) {
  83.       Reg5 bool check_after = (offset <= max_pos_offset);
  84. !     Reg6 bool check_before = (offset <= max_neg_offset);
  85.   
  86.       if (check_after && patch_match(first_guess, offset, fuzz)) {
  87.   #ifdef DEBUGGING
  88. /* End of text from mirror:net.sources.bu */
  89.