* NEWS: Document this.
* doc/diffutils.texi (Comparing Directories): Likewise.
Also, document that these options work at the top level.
* src/diff.c (compare_files): Treat EBADF like ENOENT, to handle
the case where "-" is closed. Allow the other file to be
STDIN_FILENO, in case it's "-".
* tests/Makefile.am (TESTS): Add new-file.
* tests/new-file: New file.
Derived from Tim Waugh's patch in:
http://lists.gnu.org/archive/html/bug-diffutils/2011-08/msg00034.html
* NEWS, doc/diffutils.texi (diff Options): Document this.
* src/diff.c (compare_files): Implement this, by using
find_dir_file_pathname.
* src/diff.h (find_dir_file_pathname): New decl.
* src/dir.c: Include filenamecat.h.
(find_dir_file_pathname): New function.
This makes the .texi basename the same as the package name,
which is consistent with most other GNU packages.
* doc/diffutils.texi: Rename from...
* doc/diff.texi: ...removed.
* doc/Makefile.am (info_TEXINFOS): Reflect name change.
(diffutils_TEXINFOS): Likewise.
* cfg.mk (gendocs_options_): Remove this customization. It is no
longer needed, now that the .texi name matches that of the package.
* man/Makefile.am ($(dist_man1_MANS)): Remove now-unnecessary sed
filter.
* README: Update references to diffutils.texi etc. here, too.
* .gitignore: Update here, too.
Suggested by Karl Berry.
Convert using this command:
perl -pi -e \
's/(\@option{-.}) or (\@option{--.*?}) option/$2 ($1) option/' \
doc/diff.texi
Then convert some more with this:
perl -pi -e \
's/the (\@option{-.}) or (\@option{--.*?})$/the $2 ($1)/' \
doc/diff.texi
Then convert more manually.
Suggested by Dan Jacobson
(specify_ignore_initial): Reword to avoid gcc -W warnings.
(main): Use freopen instead of setmode, since freopen is in POSIX.
* src/context.c: Revert most 2004-09-01 changes. Then:
(TIMESPEC_NS): Remove. All uses replaced by
get_stat_mtime_ns.
Include stat-time.h, strftime.h.
(nstrtime): Remove decl.
* src/diff.c: Revert most 2004-09-01 changes. Then:
Don't include <posixver.h>, <quotesys.h>, <setmode.h>.
Include <sh-quote.h>, <stat-time.h>, <timespec.h>.
All uses of quotesys replaced by sh-quote.
(main, compare_files):
Use freopen instead of setmode, since freopen is in POSIX.
(main): Don't complain about "diff -NUM'.
(main, set_mtime_to_now):
Adjust to stat-time.h macros when accessing nanoseconds.
* src/diff3.c: Include sh-quote.h rather than quotesys. All uses
changed.
* src/dir.c (dir_read): excluded_filename renamed to
excluded_file_name.
* src/io.c: Don't include <setmode.h>.
(sip, read_files): Remove binary file stuff, leaving a FIXME behind.
A DOS expert needs to look at this.
* src/diff.c: Include sh-quote.h rather than quotesys.h.
All uses changed.
* src/system.h: Include verify.h.
(verify): Remove. All uses changed to verify.h version.
Include <intprops.h>.
(TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Remove. Now uses
intprops.h versions.
(O_BINARY): New defns, taken from coreutils.
* src/util.c: Include sh-quote.h rather than quotesys.h.
All uses changed.
manipulation" from "GNU packages".
(Translations): New node.
(Overview): Improve quality of algorithm citations.
(Binary): -q doesn't exactly cause diff to assume files are binary.
(Normal): Place after Side by Side, since it's less important.
(Detailed Context, Detailed Unified, Detailed ed,
Detailed if-then-else, diff3 Hunks, Detailed diff3 Normal):
Place at end of menu.
(Detailed Unified): Mention that fractional timestamps are
omitted on hosts that don't support them.
Mention what happens when hunks contain just one line.
(Line Group Formats, Reject Names): Fix duplicate-word typos.
(Comparing Directories): Trailing white space and empty lines are
ignored in the -X file.
(diff Options): Add --strip-trailing-cr.
(Projects): gnu -> gvc@gnu.org.
Use @acronym instead of @sc where appropriate.
(Specified Lines): Renamed from Specified Folding.
(Comparison, Blank Lines):
Clarify wordings for Blank Lines and Specified Lines nodes.
(Binary): Mention --verbose and --print-bytes.
(Tabs, sdiff Option Summary, diff Options):
New option --tabsize=COLUMNS.
install-info.
Put @contents first, not last, since Texinfo now suggests this.
Fix bug in -w documentation noted by Karl Berry.
Mention links for speedup.
New node "Speedups" for future speedups.
Just say "Index", not "Concept Index".
(Detailed Context, Detailed Unified, Alternate Names, diff Options): Do not document diff -L.
(Comparing Directories): Do not document diff -P.
(Making Patches, diff Options): Likewise.
(diff Performance, sdiff Option Summary, diff Options, sdiff Options): Do not document diff -H.
(diff Performance, diff Options): Do not document --horizon-lines.
(cmp Options): Prefer -b to -c.
(cmp Options, diff Options, diff3 Options, sdiff Options): Put short
options next to the similar long options.
Document --help, and use the same wording for --verbose on all commands.
(diff3 Options): Fix typo in description of -E, which used wrongly used
"-e" instead of "-E".
(patch Options): Put short options next to the similar long options.
Update copyright to 2002.
(Standards conformance): New chapter.
(Binary): Differing binary files are trouble unless the user asked for
brief output.
(Detailed Context): Prefer new time stamp format in discussion.
(Less Context): Likewise. (Also use short option).
(Detailed Unified): Likewise.
(Alternate Names): Separate option from arg.
(Pagination): Prefer new time stamp format in discussion.
(Making Patches): Mention -U 2.
(diff Options): Deprecate -LINES, as POSIX 1003.1-2001 does not allow it.
is assumed to modify the integer 1. Index terms like "kibibyte".
Document plain "k".
(Reporting Bugs): Mention bug-report archive and test version
location. Ask for "diff --version" in bug reports.
rather than "character" when talking about cmp, since it compares
bytes, not character.
(Invoking cmp): New trailing operands FROM-SKIP and TO-SKIP.
-i or --ignore-initial now accepts FROM-SKIP:TO-SKIP.
New option -n or --bytes.
Count operands now may be in octal or hex, and may be followed by a
size multiplier.
Add individual utilities.
Switch to Free Documentation License.
@code -> @command
@samp -> @option
GNU -> @sc{gnu}
GNU patch version is 2.5.4.
Expand tabs to spaces, except when in an example that actually uses tabs.
Prefer @node with just one arg.
Document -E or --ignore-tab-expansion, --strip-trailing-cr, --ignore-file-name-case.
Regular expressions are now grep style, not Emacs style.
cmp's -c or --print-chars option is now -b or --print-bytes.
Time stamps now depend on LC_TIME.
-p now implies ^[[:alpha:]$_].
Flags now include ' and 0.
cmp -i is an alias for --ignore-initial
Document --from-file, --to-file.
Document DIFF_OPTIONS.
The patch doc still corresponds to patch 2.2, unfortunately.
Update GNU bug reporting address. Omit Larry Wall's address;
it's obsolete and he's busy with perl.