Anonymous | Login | 2024-03-28 13:39 UTC |
Main | My View | View Issues | Change Log | Docs |
Viewing Issue Simple Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||
ID | Category | Severity | Type | Date Submitted | Last Update | ||
0000946 | [1003.1(2008)/Issue 7] Shell and Utilities | Objection | Omission | 2015-05-06 09:37 | 2015-07-09 16:02 | ||
Reporter | joerg | View Status | public | ||||
Assigned To | ajosey | ||||||
Priority | normal | Resolution | Withdrawn | ||||
Status | Closed | ||||||
Name | Jörg Schilling | ||||||
Organization | |||||||
User Reference | |||||||
Section | diff | ||||||
Page Number | 2626-2628 | ||||||
Line Number | 85265-85318 | ||||||
Interp Status | --- | ||||||
Final Accepted Text | |||||||
Summary | 0000946: diff description of line numbers for -C/-U is not correct | ||||||
Description |
Both, the descritions for the beginning line number with the -C and -U options are missing/wrong. diff is oriented on the ed behavior and thus line numbers must follow ed rules. For a search, delete or modify operatoion, the line number to junp to, is the line number where the operation takes place. For an insert operation, the line number is the line number of the line just before the insert takes place (0 if the insert should happen at the beginning of the file). Context diffs and unified context diffs usually start with unaffected lines and the related ed operation is a search operation that expects the line number of the first matching line. The diff description however explicitely permits context diffs with a context of 0. Context diffs and unified context diffs with a context of 0 are different as they do not start with unaffected lines but with the first affected line. An insert operation thus needs a line number that differs from other operations. The current text for -C is correct only for -Cn with n > 0 as the term "line-numer" is not explained. The current text for -U is extremely ambiguous and may have caused the incorrect behavior implemented with the Solaris diff command. We need a useful description of what the "beginning line" number is. |
||||||
Desired Action |
It may be wise to change line 85267 to contain "beginning line number" instead of ending line number as only one line is affected. Add the following text after line 85267: The beginning line number is the line number for the first line in the following context block, except when there is no unaffected line in the block and the first affected line is an inserted line. On line 85317 after "otherwise." insert: The beginning line number is the line number for the first line in the following context block, except when there is no unaffected line in the block and the first affected line is an inserted line. It may be wise to add a rationale for this problem... |
||||||
Tags | No tags attached. | ||||||
Attached Files | |||||||
|
Mantis 1.1.6[^] Copyright © 2000 - 2008 Mantis Group |