Defect Report concerning: IEEE Std. 1003.2-1992, ISO/IEC 9945-2:1993 - Shell & Utilities
Clause: 5.22.7.2
PASC Interpretation Ref: pasc-1003.2-15
Topic: patch


This is an unapproved interpretation of PASC 1003.2-1992, ISO/IEC 9945-2:1993 - Shell & Utilities.

Use of the information contained in this unapproved document is at your own risk.

Last update: 20 April,2001


								1003.2-92  #15

	Class: The unaddressed issue

The standard does not speak to this issue, and as such no conformance
distinction can be made between alternative implementations based on this.
This is being referred to the Sponsors of the standard  for clarifying 
wording in the next amendment.

This response will be incorporated in an IEEE interpretations
publication, and will be also made available on-line on the IEEE 
SPAsystem.

 _____________________________________________________________________________



	Interpretation Number:	(to be assigned by the IEEE)
	Topic:			patch
	Relevant Sections:	5.22.7.2


Interpretation Request: (Defect Report)
-----------------------
 
          In  Section  5.22.7.3  -  Patch  Application,  the  standard 
          states: 
 
               For each hunk, the patch utility  shall  begin  to 
               search for the place to apply  the  patch  at  the 
               line number at the beginning of the hunk, plus  or 
               minus any offset used  in  applying  the  previous 
               hunk.  If lines matching the hunk context are  not 
               found, the patch utility shall scan both  forwards 
               and backwards at least 1000 bytes  for   2:  Shell   and 
          Utilities. 
 
          In Section 5.22.7.1 - Patchfile Format, the standard  states 
          that ``[e]ach patch shall contain  zero  or  more  lines  of 
          filename identification in the format produced  by  diff  -c 
          (see 4.17), and one or  more  sets  of  diff  output,  which 
          customarily are called ``hunks.''''  [Draft 12 of  IEEE  Std 
          1003.2-1992 (July 1992), p. 619, lines 3564-3566] 
 
          Since there is no restriction placed on  the  sets  of  diff 
          output, is the following a valid patch? 
 
               *** dummy~ Thu Nov 19 14:55:01 1992 
               --- dummy Thu Nov 19 14:55:01 1992 
               18d17 
               < Ababa 
               20c19,21 
 
 
 
          patch.2-3694               - 2 -             November 27, 1992 
 
 
 
               < abacus 
               --- 
               > Ababa 
               > abcaus 
               > test 
 
          If not, and ``hunks'' are only intended to b, or after each scan? 
 

IEEE Interpretation for 1003.2-1992 
-----------------------------------


The standard is silent on how a request (via -R) to reverse a patch
shall be processed; the standard thus allows any behavior by a
conforming implementation. Concern over the wording of this area has
been forwarded to the Sponsors of this standard.

Rationale for Interpretation:
-----------------------------

None.
 _____________________________________________________________________________