| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Run "make update-copyright".
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* tests/binary: Reverse arguments to compare to avoid failure of
new syntax-check rule.
* configure.ac: Use -Wno-format-nonliteral.
Mark functions as pure of const, per recommendations enabled by
new gcc -W options. Use _GL_ATTRIBUTE_PURE and _GL_ATTRIBUTE_CONST.
* lib/cmpbuf.h (buffer_lcm, block_compare):
Apply pure and/or const attributes.
* src/cmp.c (block_compare): Likewise.
* src/context.c (find_hunk): Likewise.
* src/diff.h (lines_differ): Likewise.
* src/diff3.c (skipwhite): Likewise.
* src/dir.c (dir_loop): Likewise.
* src/util.c (find_change, find_reverse_change): Likewise.
(translate_line_number): Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Derived from Roland McGrath's patch (dated June 2004!) in:
http://lists.gnu.org/archive/html/bug-gnu-utils/2004-07/msg00000.html
* NEWS:
* doc/diffutils.texi (White Space, Blank Lines)
(sdiff Option Summary, diff Options, sdiff Options): Document -Z.
* src/diff.h (IGNORE_TRAILING_SPACE)
(IGNORE_TAB_EXPANSION_AND_TRAILING_SPACE): New constants, for -Z.
* src/diff.c (shortopts, longopts, main, option_help_msgid):
* src/sdiff.c (longopts, option_help_msgid, main):
* src/io.c (find_and_hash_each_line):
* src/util.c (lines_differ, analyze_hunk): Support -Z.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Our use of vfork now provokes warnings from gcc-4.6.0.
Also, vfork is no longer even specified by POSIX.1-2008.
* src/diff3.c (read_diff): Change each use of vfork to "fork".
Remove #ifdef'd code.
* src/util.c (begin_output, finish_output): Likewise.
* src/sdiff.c (cleanup, main, edit): Likewise.
(handler_index_of_SIGPIPE): Remove now-unused definition.
* src/system.h: Don't include <vfork.h>.
(vfork): Remove definition.
* ms/config.site: Remove reference to vfork cache variable.
|
|
|
|
| |
Run "make update-copyright", so "make syntax-check" works in 2011.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* bootstrap.conf (gnulib_modules): Add filenamecat.
* src/diff.c: Include "filenamecat.h".
(compare_files): Use file_name_concat, rather than dir_file_pathname.
* src/util.c (dir_file_pathname): Remove now-unused function.
* src/diff.h: Remove its declaration.
* tests/excess-slash: New script to test for this.
* tests/Makefile.am (TESTS): Add it.
Forwarded by Santiago Vila from <bugs.debian.org/586301a>,
reported by Jari Aalto.
|
|
|
|
|
|
|
| |
* src/sdiff.c [!HAVE_WORKING_FORK && !HAVE_WORKING_VFORK] (main):
Pass the right number of arguments to shell_quote_copy.
* src/util.c [!HAVE_WORKING_FORK && !HAVE_WORKING_VFORK] (begin_output):
Likewise.
|
|
|
|
|
|
| |
Use this command:
git ls-files |grep -vE '^(\..*|COPYING|gnulib)$' |xargs \
env UPDATE_COPYRIGHT_USE_INTERVALS=1 build-aux/update-copyright
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
* doc/diff.texi (Detailed Unified): Trailing spaces are no longer
omitted.
(Trailing Blanks): New section.
(diff Options) Mention new option.
* src/diff.h (suppress_blank_entry): New decl.
* src/context.c (pr_unidiff_hunk): Support --suppress-blank-empty.
* src/util.c (print_1_line): Likewise.
* src/diff.c (longopts, main, option_help_msgid): Likewise.
(SUPPRESS_BLANK_EMPTY_OPTION): New constant.
|
|
|
|
|
|
| |
adjusting to gnulib API change. This avoids a memory leak.
* src/sdiff.c (expand_name): Likewise.
* src/util.c (dir_file_pathname): Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* AUTHORS: Update from GPLv2 to GPLv3.
* Makefile.am: Likewise.
* NEWS: Likewise.
* README: Likewise.
* README-hacking: Likewise.
* bootstrap: Likewise.
* bootstrap.conf: Likewise.
* configure.ac: Likewise.
* exgettext: Likewise.
* doc/Makefile.am: Likewise.
* lib/Makefile.am: Likewise.
* lib/cmpbuf.c: Likewise.
* lib/cmpbuf.h: Likewise.
* lib/prepargs.c: Likewise.
* m4/vararrays.m4: Likewise.
* man/Makefile.am: Likewise.
* ms/Makefile.am: Likewise.
* ms/README: Likewise.
* ms/config.bat: Likewise.
* ms/config.sed: Likewise.
* ms/config.site: Likewise.
* po/POTFILES.in: Likewise.
* src/Makefile.am: Likewise.
* src/analyze.c: Likewise.
* src/cmp.c: Likewise.
* src/context.c: Likewise.
* src/diff.c: Likewise.
* src/diff.h: Likewise.
* src/diff3.c: Likewise.
* src/dir.c: Likewise.
* src/ed.c: Likewise.
* src/io.c: Likewise.
* src/normal.c: Likewise.
* src/sdiff.c: Likewise.
* src/system.h: Likewise.
* src/util.c: Likewise.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(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.
|
|
|
|
|
|
| |
(lines_differ): Don't convert char * to unsigned char *;
just leave pointers as char *. This lessens the number of
potentially-dangerous casts.
|
|
|
|
|
|
| |
(lines_differ, output_1_line): New option --tabsize=COLUMNS.
(analyze_hunk): If -b or -w is also specified, -B now considers
lines to be empty if they contain only white space.
|
|
|
|
|
| |
Adopt POSIX convention for ENOEXEC and exit status 126.
unsigned -> unsigned int
|
|
|
|
|
| |
(lines_differ): Have an explicit do-nothing case for
IGNORE_NO_WHITE_SPACE, to pacify gcc -Wall.
|
|
|
|
|
|
| |
failure on its own. Set errno to 0 before invoking popen.
(finish_output): Report errno on pclose failure.
Distinguish between subsidiary program not found, and failure.
|
|
|
|
| |
(dir_file_pathname): Use base_name rather than file_name_lastdirchar.
|
|
|
|
| |
HAVE_WORKING_FORK || HAVE_WORKING_VFORK.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
int -> bool for booleans.
int -> lin for line numbers.
int -> size_t for sizes.
Use angle-brackets when including quotesys.h.
Include error.h, regex.h, xalloc.h.
(message5): sizeof -> offsetof
(begin_output): Invoke pr without -f.
(lines_differ): Renamed from line_cmp, and return bool not 3-way int.
All callers changed.
Add support for IGNORE_TAB_EXPANSION.
(change_letter): Now an array rather than a function. All callers changed.
(translate_range): Translate line numbers to long, not lin, for convenience
with printf.
(analyze_hunk): Return enum changes instead of a count of inserts and deletes.
All callers changed.
(zalloc): New function.
|
|
|
|
|
|
|
|
|
|
| |
(PR_PROGRAM): New macro.
(pfatal_with_name): Abort if error returns.
(fatal): Likewise.
(print_message_queue): Free message chain after printing.
(currently_recursive): Renamed from current_depth, and now a boolean.
(begin_output): Report error if fflush does.
Avoid stdio and gettext in child.
|
|
|
|
|
|
|
|
|
|
| |
(PR_PROGRAM): New macro.
(pfatal_with_name): Abort if error returns.
(fatal): Likewise.
(print_message_queue): Free message chain after printing.
(currently_recursive): Renamed from current_depth, and now a boolean.
(begin_output): Report error if fflush does.
Avoid stdio and gettext in child.
|
|
|
|
| |
to save a messsage.
|
|
|
|
|
|
|
|
|
| |
(begin_output): Use system_quote_arg to compute command.
(analyze_hunk): ignore_regexp_list -> ignore_regexp.fastmap
Fix off-by-1 line length bug.
Match with one big regexp instead of a list of regexps.
Use new `trivial_length' local instead of comparing line's first byte to `\n'.
Help the compiler with linbuf local vars.
|
|
|
|
|
|
| |
(error): Remove.
(line_cmp): tolower -> _tolower
(xmalloc, xrealloc): Remove.
|
| |
|
|
|
|
|
| |
(PR_PROGRAM): Moved here from diff.h (old name was PR_FILE_NAME).
(begin_output): Use SYSTEM_QUOTE_ARG.
|
| |
|
|
|
|
|
|
|
| |
for common case of exact equality; the caller does that optimization now.
Optimize for the common case of mostly exact equality.
Use isupper/tolower instead of islower/toupper, for consistency.
(line_cmp, print_line): Use '\n' instead of line_end_char.
|
| |
|
| |
|
|
|
|
|
| |
type agree with the prototype parameter type; this doesn't work on
Apollos running bsd4.3.
|
| |
|
|
|
|
|
|
| |
to match standard.
(xmalloc, xrealloc): Cast malloc, realloc
to (VOID *) to suppress bogus warnings on some nonstandard hosts.
|
|
|
|
|
| |
Ensure that its argument isn't negative.
(xmalloc, xrealloc): Remove needless casts.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use size_t, not int, when needed. Use STD{IN,OUT,ERR}_FILENO instead of [012].
(struct msg, msg_chain, msg_chain_end): Moved here from diff.h.
(message5): New function.
(pr_pid): New var.
(begin_output): Allocate `name' more precisely.
Put child pid into pr_pid, so that we can wait for it later.
Don't check execl's return value, since any return must be an error.
(finish_output): Detect and report output errors.
Use waitpid if available. Check pr exit status.
(line_cmp): Use locale's definition of white space
instead of using one hardwired defn for -b and another for -w.
(analyze_cmp): Avoid double negation with `! nontrivial'.
Pacify `gcc -Wall' be rewriting for-loop into do-while-loop.
(dir_file_pathname): New function.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|