home *** CD-ROM | disk | FTP | other *** search
/ GEMini Atari / GEMini_Atari_CD-ROM_Walnut_Creek_December_1993.iso / files / utility / patch / patch.man < prev    next >
Encoding:
Text File  |  1988-07-26  |  14.2 KB  |  137 lines

  1. .rn '' }`
  2. ''' $Header: patch.man,v 2.0.1.2 88/06/22 20:47:18 lwall Locked $
  3. ''' 
  4. ''' $Log:    patch.man,v $
  5. ''' Revision 2.0.1.2  88/06/22  20:47:18  lwall
  6. ''' patch12: now avoids Bell System Logo
  7. ''' 
  8. ''' Revision 2.0.1.1  88/06/03  15:12:51  lwall
  9. ''' patch10: -B switch was contributed.
  10. ''' 
  11. ''' Revision 2.0  86/09/17  15:39:09  lwall
  12. ''' Baseline for netwide release.
  13. ''' 
  14. ''' Revision 1.4  86/08/01  19:23:22  lwall
  15. ''' Documented -v, -p, -F.
  16. ''' Added notes to patch senders.
  17. ''' 
  18. ''' Revision 1.3  85/03/26  15:11:06  lwall
  19. ''' Frozen.
  20. ''' 
  21. ''' Revision 1.2.1.4  85/03/12  16:14:27  lwall
  22. ''' Documented -p.
  23. ''' 
  24. ''' Revision 1.2.1.3  85/03/12  16:09:41  lwall
  25. ''' Documented -D.
  26. ''' 
  27. ''' Revision 1.2.1.2  84/12/05  11:06:55  lwall
  28. ''' Added -l switch, and noted bistability bug.
  29. ''' 
  30. ''' Revision 1.2.1.1  84/12/04  17:23:39  lwall
  31. ''' Branch for sdcrdcf changes.
  32. ''' 
  33. ''' Revision 1.2  84/12/04  17:22:02  lwall
  34. ''' Baseline version.
  35. ''' 
  36. .de Sh
  37. .br
  38. .ne 5
  39. .PP
  40. \fB\\$1\fR
  41. .PP
  42. ..
  43. .de Sp
  44. .if t .sp .5v
  45. .if n .sp
  46. ..
  47. '''
  48. '''     Set up \*(-- to give an unbreakable dash;
  49. '''     string Tr holds user defined translation string.
  50. '''     Bell System Logo is used as a dummy character.
  51. '''
  52. .ie n \{\
  53. .tr \(*W-\*(Tr
  54. .ds -- \(*W-
  55. .if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
  56. .if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
  57. .ds L" ""
  58. .ds R" ""
  59. .ds L' '
  60. .ds R' '
  61. 'br\}
  62. .el\{\
  63. .ds -- \(em\|
  64. .tr \*(Tr
  65. .ds L" ``
  66. .ds R" ''
  67. .ds L' `
  68. .ds R' '
  69. 'br\}
  70. .TH PATCH 1 LOCAL
  71. .SH NAME
  72. patch - a program for applying a diff file to an original
  73. .SH SYNOPSIS
  74. .B patch
  75. [options] orig patchfile [+ [options] orig]
  76. .sp
  77. but usually just
  78. .sp
  79. .B patch
  80. <patchfile
  81. .SH DESCRIPTION
  82. .I Patch
  83. will take a patch file containing any of the three forms of difference
  84. listing produced by the
  85. .I diff
  86. program and apply those differences to an original file, producing a patched
  87. version.
  88. By default, the patched version is put in place of the original, with
  89. the original file backed up to the same name with the
  90. extension \*(L".orig\*(R" or \*(L"~\*(R" , or as specified by the
  91. .B -b
  92. switch.
  93. You may also specify where you want the output to go with a
  94. .B -o
  95. switch.
  96. If
  97. .I patchfile
  98. is omitted, or is a hyphen, the patch will be read from standard input.
  99. .PP
  100. Upon startup, patch will attempt to determine the type of the diff listing,
  101. unless over-ruled by a
  102. .BR -c ,
  103. .BR -e ,
  104. or
  105. .B -n
  106. switch.
  107. Context diffs and normal diffs are applied by the
  108. .I patch
  109. program itself, while ed diffs are simply fed to the
  110. .I ed
  111. editor via a pipe.
  112. .PP
  113. .I Patch
  114. will try to skip any leading garbage, apply the diff,
  115. and then skip any trailing garbage.
  116. Thus you could feed an article or message containing a
  117. diff listing to
  118. .IR patch ,
  119. and it should work.
  120. If the entire diff is indented by a consistent amount,
  121. this will be taken into account.
  122. .PP
  123. With context diffs, and to a lesser extent with normal diffs,
  124. .I patch
  125. can detect when the line numbers mentioned in the patch are incorrect,
  126. and will attempt to find the correct place to apply each hunk of the patch.
  127. As a first guess, it takes the line number mentioned for the hunk, plus or
  128. minus any offset used in applying the previous hunk.
  129. If that is not the correct place,
  130. .I patch
  131. will scan both forwards and backwards for a set of lines matching the context
  132. given in the hunk.
  133. First
  134. .I patch
  135. looks for a place where all liØ⇩'ij⇦gijIJג'ה@ג⇧ijτij◆ה⇧αxI⇦gij@'א╱⇧τבijו╱⇦'IJ⇩'ג@DατוDτIJΣ⇩'ו'ה@ג⇧ijτגIJ⇦D`τוDτijIJג'ij◆⇧IJ'ג@@gגG╱ij⇩xA⇩'א⇦τijij'π'ij⇩gij⇩D τijIJגgו@IJג⇩gא╱◆gijו⇦⇩'בijו╱⇦'IJ⇦@⇩AD'ijIJגH⑨á«⓪Ã⇨q´ _,ast
  136. lindOÇ✓נîüê⇨üij≡Æ✓נüât fails, and the maximum fuzz factor is set to 2 or more,
  137. the first two and last tw lipê⇦OÅø⑦ה@ג⇧ijτו⇩D'IJ⇦@⇩D⇦α°GDτו@IJג⇩gא╱◆gIJ⇩'ij◆⇦ג xaijIJג'גג⇦Gijτij◆⇧IJ'ג@@gגG╱ij⇩gIJ⇩'Γ`a8I⇦x`I'בוה⇧°F◆@@τגADτו'בijו╱⇦'ijij'IJBוijτijIJוτIJij@'ij⇦gijIJג'בוה⇧ατIJτij⇧ijτבijτijIJג8Aij@'ijτijij'ו'אDD╱τגAג τij⇧IJ╱⇧τij@⇩@◆ijIJ'IJ⇩'ijIJג'ijG⇦'ij⇦gijIJג'ijבijτגAג8Cijij⇩'ijαaזµ`BD@αaאfgij⇩gijαaזµfαaאfgαxaז@ג'ijIJוτijIJג'אDD╱ג⇦τIJij@'ij⇧ijτה⇦'ijτIJgה@ג⇧ijτגIJ⇦Dgג@⇩@'ij⇧גIJג⇩gijIJג8ACijτבוה⇧τij◆⇩'ו'ה@ג⇧ijτגIJ⇦Dgij⇩gו'ij@⇩[X[✓⑨əYÖïéÆYêə⑨Hə[£]✓