| 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.
|
|
|
|
|
| |
* src/diff3.c: Don't include <inttostr.h>. Not used.
* src/context.c: Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* src/Makefile.am: Generate version.c and version.h and put the
new symbol in a tiny library to be used by each program.
(LDADD): Add the new library.
* src/cmp.c (main): Use Version, not PACKAGE_VERSION, so the .o
file does not change with each commit-derived version increment.
* src/diff.c (main): Likewise.
* src/diff3.c (main): Likewise.
* src/sdiff.c (main): Likewise.
* src/system.h: Include "version.h".
* .gitignore: Add version.[ch]
|
|
|
|
|
|
|
|
| |
* cmp.c (option_help_msgid, usage),
* diff.c (option_help_msgid, usage),
* diff3.c (option_help_msgid, usage),
* sdiff.c (option_help_msgid, usage): align descriptions in the --help
output and slightly edit content.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
* src/diff.c (specify_value): Use !STREQ(...), not strcmp(...) != 0.
* src/diff3.c (main): Likewise.
|
|
|
|
| |
Run "make update-copyright", so "make syntax-check" works in 2011.
|
|
|
|
|
|
| |
Use this command:
git ls-files |grep -vE '^(\..*|COPYING|gnulib)$' |xargs \
env UPDATE_COPYRIGHT_USE_INTERVALS=1 build-aux/update-copyright
|
|
|
|
|
|
|
|
|
| |
* src/cmp.c: Include "xfreopen.h".
Use xfreopen in place of freopen.
* src/diff.c Likewise, and...
(main): Set exit_failure to EXIT_TROUBLE, rather than to 2.
* src/diff3.c: Likewise.
* bootstrap.conf (gnulib_modules): Add xfreopen.
|
|
|
|
| |
* src/diff3.c (make_3way_diff): Remove dead assignment.
|
|
|
|
|
|
|
|
|
|
| |
* bootstrap.conf (gnulib_modules): Add propername.
* src/cmp.c (PROGRAM_NAME, AUTHORS): Define.
(main): Use them in use of version_etc.
* src/diff.c (PROGRAM_NAME, AUTHORS, main): Likewise.
* src/diff3.c (PROGRAM_NAME, AUTHORS, main): Likewise.
* src/sdiff.c (PROGRAM_NAME, AUTHORS, main): Likewise.
* src/system.h: Include "propername.h".
|
|
|
|
|
|
|
|
|
|
|
| |
* configure.ac (AC_INIT): Use bug-diffutils@..., not bug-gnu-utils
as the bug-reporting address.
* NEWS (Administrivia): Mention this.
* src/cmp.c (usage): Remove hard-coded address.
Instead, use gnulib's emit_bug_reporting_address function.
* src/diff.c (usage, option_help_msgid): Likewise.
* src/diff3.c (usage): Likewise.
* src/sdiff.c (usage): Likewise.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
* bootstrap.conf (gnulib_modules): Add progname.
* cfg.mk (local-checks-to-skip): Add sc_program_name.
* src/cmp.c: Include progname.h.
(program_name): Remove declaration.
(main): Call set_program_name.
* src/diff.c (main): Likewise.
* src/diff3.c (main): Likewise.
* src/sdiff.c (main): Likewise.
* src/diff.h (program_name): Remove extern declaration.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Run this command:
git grep -l 'strcmp *([^=]*== *0'|xargs \
perl -pi -e 's/\bstrcmp( *\(.*?\)) *== *0/STREQ$1/g'
and then add the new definition.
* src/system.h (STREQ): Define.
* src/cmp.c (main): Use STREQ, not strcmp.
* src/diff.c (main, compare_files): Likewise.
* src/diff3.c (main): Likewise.
* src/sdiff.c (expand_name): Likewise.
* cfg.mk (local-checks-to-skip): Add sc_prohibit_strcmp.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Prefer fputs or fputc to fprintf, since it's a tad more efficient
with unlocked-IO on glibc. Long ago we avoided fputs to
work around an ancient SunOS bug, but that's no longer relevant.
* src/diff3.c (output_diff3, dotlines, undotlines):
(output_diff3_edscript, output_diff3_merge): Likewise.
This also avoids a gcc -Wformat-security warning reported
by Jim Meyering.
* src/ed.c (print_ed_hunk, print_forward_ed_hunk, print_rcs_hunk):
Likewise.
* src/normal.c (print_normal_hunk): Likewise.
|
|
|
|
|
|
|
|
|
| |
(IF_LINT): New macro, to pacify GCC.
* src/analyze.c (diag, compareseq): Use IF_LINT.
* src/cmp.c (cmp): Likewise.
* src/diff3.c (process_diff): Likewise. Also, prefer NULL to 0.
* src/ifdef.c (do_printf_spec, scan_char_literal): Likewise.
* src/sdiff.c (edit): 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.
|
|
|
|
|
|
|
|
|
|
|
|
| |
(main): Adjust to latest gnulib c_stack_action calling conventions.
Adjust to latest version_etc calling conventions.
Include unlocked-io.h.
(strip_trailing_cr): New var.
(STRIP_TRAILING_CR_OPTION): New enum.
(longopts, main, option_help_msgid, read_diff):
Add --strip-trailing-cr support.
(read_diff): Exit with status 126 (not 127) if errno != ENOENT
after failed execvp in child. Report this in parent.
|
|
|
|
|
|
| |
(copyright_notice): Remove.
(main): Use version_etc to print version.
(version_string): Remove decl.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Include paths.h.
(copyright_notice): Renamed from copyright_string.
Now a msgid, so that copyright symbol can be translated.
All uses changed.
(skipwhite, readnum): New functions.
(process_diff_control): Use them.
(SKIPWHITE, READNUM): Remove.
(read_diff): Don't worry about errno == ENOEXEC.
|
|
|
|
| |
(read_diff): Use block_read instead of read, to work around Tru64 5.1 bug.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(ALLOCATE): Remove. All uses changed to xmalloc, or to xmalloc plus
an overflow check.
(myread): Remove.
(main): Check for stack overflow.
0 -> EXIT_SUCCESS, 1 -> EXIT_FAIULRE, 2 -> EXIT_TROUBLE.
(try_help): Likewise.
(process_diff): Check for integer overflow, to avoid core dumps.
2 -> EXIT_TROUBLE.
(read_diff): Exit with status 126 if the file is not executable,
for compatibility with POSIX 1003.1-2001.
Accommodate ancient AIX hosts that set errno to EINTR after uncaught
SIGCONT.
Check for integer overflow to avoid core dumps.
(fatal, perror_with_exit): 2 -> EXIT_TROUBLE.
|
|
|
|
|
| |
(usage): Reformat messages to ease translation.
(main): Remove unused variable.
|
|
|
|
|
|
|
|
|
|
|
| |
(longopts, main): Use them.
(longopts, main, option_help_msgid): New option --diff-option=PROGRAM.
(main): Remove DIFF_PROGRAM support.
Check stdout after printing version.
(check_stdout): Report errno info if fclose fails.
(read_diff): Have child exit with status 127 when program is not found,
rather than trying to have the child report failure. CHeck for
pclose returning -1.
|
|
|
|
| |
allocator.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
int -> bool for booleans.
int -> lin for line numbers.
Use angle-brackets when including getopt.h, quotesys.h.
Include error.h, freesoft.h, inttostr.h, xalloc.h.
(copyright_string): Use only most recent year.
(authorship_msgid, option_help_msgid): Wrap in N_().
Rename the following variables for consistency with user-visible
option spellings. All uses changed.
(text): Renamed from always_text.
(initial_tab): Renamed from tab_align_flag.
(horizon_lines): Remove. Remove all uses.
(main): Invoke bindtextdomain and textdomain after setlocale.
Rename "DIFF" to "DIFF_PROGRAM".
Try to compare file0 to file1, because this is where changes are
expected to come from. Diffing between these pairs of files is more
likely to avoid phantom changes from file0 to file1.
However, use file2 as the common file if this is a 3-way diff,
for backward compatibility.
(create_diff3_block): Use xcalloc instead of malloc + bzero.
(INT_STRLEN_BOUND): Remove; now in system.h.
(read_diff): Always use --horizon-lines=100 rather than trying to guess it.
Do not pass --inhibit-hunk-merge.
Minimum chunk size is 1, not 8KiB.
Use xalloc_die to report memory exhaustion.
(undotlines): Use long for start, not int.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(free_software_msgid): New decl.
(RANGE_START, RANGE_END): Renamed from START and END.
(fatal, perror_with_exit, try_help): Add noreturn attribute.
(error): Add printf attribute.
(diff_program): Now a ptr, not an array. Initialize to DEFAULT_DIFF_PROGRAM
instead of DIFF_PROGRAM.
(longopts, main): Don't assume ASCII.
(main): Use DIFF environment var to specify name of diff program.
Compare getopt_long result to -1, not EOF.
-v now reports version according to new GNU standard.
Report spelling of extra operand, or last operand before missing one.
(try_help): Now takes operand arg.
(option_help_ms): Fix typo: missing comma.
(usage): Update as per current GNU standards.
(environ): Remove decl.
(read_diff): Invoke diff with --inhibit-hunk-merge.
Translate `not found' message before forking.
Quote name of diff program.
Pass horizon lines.
`memory exhausted' -> `Memory exhausted'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(free_software_msgid): New decl.
(RANGE_START, RANGE_END): Renamed from START and END.
(fatal, perror_with_exit, try_help): Add noreturn attribute.
(error): Add printf attribute.
(diff_program): Now a ptr, not an array. Initialize to DEFAULT_DIFF_PROGRAM
instead of DIFF_PROGRAM.
(longopts, main): Don't assume ASCII.
(main): Use DIFF environment var to specify name of diff program.
Compare getopt_long result to -1, not EOF.
-v now reports version according to new GNU standard.
Report spelling of extra operand, or last operand before missing one.
(try_help): Now takes operand arg.
(option_help_ms): Fix typo: missing comma.
(usage): Update as per current GNU standards.
(environ): Remove decl.
(read_diff): Invoke diff with --inhibit-hunk-merge.
Translate `not found' message before forking.
Quote name of diff program.
Pass horizon lines.
`memory exhausted' -> `Memory exhausted'
|
|
|
|
|
| |
(option_help_msgid): New constant.
(usage): Use it, so message is translated one option at a time.
|
| |
|
|
|
|
|
| |
(xmalloc, xrealloc): Remove.
(fatal, perror_with_exit): Use `error'.
|
|
|
|
| |
value.
|
|
|
|
|
| |
(main): Give proper diagnostic if too many labels were given.
(read_diff): Use SYSTEM_QUOTE_ARG.
|
| |
|
| |
|
|
|
|
|
| |
(usage): Just print usage; let caller worry about exiting.
(read_diff): Use new waitpid substitute.
|
|
|
|
|
|
|
| |
If we'll have children, make sure SIGCHLD isn't ignored.
(read_diff): Use popen+pclose if !HAVE_FORK.
(DIFF_CHUNK_SIZE): Removed. We now get initial chunk size from STAT_BLOCKSIZE.
(INT_STRLEN_BOUND): New macro.
|
|
|
|
|
| |
type agree with the prototype parameter type; this doesn't work on
Apollos running bsd4.3.
|
|
|
|
|
| |
(long_options, main, usage): Add `--help'.
(read_diff): Detect integer overflow in buffer size calculations.
|
|
|
|
| |
to (VOID *) to suppress bogus warnings on some nonstandard hosts.
|
|
|
|
|
|
| |
(xmalloc): Now static.
(xmalloc, realloc): Remove needless casts.
(READNUM): Ensure isdigit argument isn't negative.
|