[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
diff-utils
From: |
Neal H Walfield |
Subject: |
diff-utils |
Date: |
Thu, 13 Dec 2001 17:47:47 +0100 |
User-agent: |
Gnus/5.090004 (Oort Gnus v0.04) Emacs/21.1 |
There is a small error in the output of `diff --help.' It claims the
following:
-c -C NUM --context[=NUM] Output NUM (default 2) lines of copied context.
-u -U NUM --unified[=NUM] Output NUM (default 2) lines of unified-context.
First, this is wrong, the second version of the Single Unix
Specification specifically says that there must be three lines of
context by default:
Diff -c or -C Output Format
With the -c or -C option, the output format will consist of
affected lines along with surrounding lines of context. The
affected lines will show which ones need to be deleted or
changed in file1, and those added from file2. With the -c
option, three lines of context, if available, will be written
before and after the affected lines.
This, however, agrees with the both the info manual and the
implementation.
Here is a patch to correct this discrepancy:
2001-12-12 Neal H Walfield <address@hidden>
* diff.c (option_help): Correct the desciption of the `-c' and
`-u' to match the info manual and the implementation.
diff -upr diffutils-2.7.orig/diff.c diffutils-2.7/diff.c
--- diffutils-2.7.orig/diff.c Thu Sep 22 18:47:00 1994
+++ diffutils-2.7/diff.c Wed Dec 12 21:38:47 2001
@@ -1,5 +1,5 @@
/* GNU DIFF main routine.
- Copyright (C) 1988, 1989, 1992, 1993, 1994 Free Software Foundation, Inc.
+ Copyright (C) 1988, 1989, 1992, 1993, 1994, 2001 Free Software Foundation,
Inc.
This file is part of GNU DIFF.
@@ -687,8 +701,8 @@ static char const * const option_help[]
"--binary Read and write data in binary mode.",
#endif
"-a --text Treat all files as text.\n",
-"-c -C NUM --context[=NUM] Output NUM (default 2) lines of copied context.",
-"-u -U NUM --unified[=NUM] Output NUM (default 2) lines of unified
context.",
+"-c -C NUM --context[=NUM] Output NUM (default 3) lines of copied context.",
+"-u -U NUM --unified[=NUM] Output NUM (default 3) lines of unified
context.",
" -NUM Use NUM context lines.",
" -L LABEL --label LABEL Use LABEL instead of file name.",
" -p --show-c-function Show which C function each change is in.",
- diff-utils,
Neal H Walfield <=