| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Run "make update-copyright".
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
| |
Run "make update-copyright", so "make syntax-check" works in 2011.
|
|
|
|
|
| |
* src/sdiff.c: Remove #if-!HAVE_SIGPROCMASK-guarded code.
* bootstrap.conf (gnulib_modules): Add sigprocmask.
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
* doc/diff.texi (Merge Commands): Likewise.
* src/sdiff.c (give_help): Give help for them.
(edit): Support them.
|
|
|
|
|
|
|
|
|
|
| |
* src/cmp.c: Don't include exit.h; no longer needed.
* src/diff.c: Likewise.
* src/sdiff.c: Likewise.
* src/dir.c: Don't include strcase.h; no longer needed.
* README-alpha: Remove, replacing with:
* README-hacking: New file, taken from coreutils with some changes.
The rename is required by the change to 'bootstrap'.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
exist if sigprocmask does not. Problem reported by Paul Edwards
for MVS 3.8.
* configure.ac (sigblock): Check whether this function is
available, if sigprocmask is not.
* src/sdiff.c (sigs): Omit SIGPIPE if it's not defined.
Put SIGINT last; all uses changed.
(handler_index_of_SIGPIPE): Omit if SIGPIPE is not defined.
(sigblock, sigsetmask) [!HAVE_SIGBLOCK]: New macros.
|
|
|
|
|
| |
sigset_t *, since it might be a literal 0. Problem reported by
Paul Edwards for MVS 3.8.
|
|
|
|
|
|
|
|
|
| |
(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>, <exit.h>.
(check_child_status): Renamed from ck_editor_status, and
accept a new arg MAX_OK_STATUS. All callers changed.
Handle status 126/127 as per POSIX.
(edit): Likewise.
(main): Likewise. Fix getopt typo: -E wasn't supported.
|
|
|
|
|
|
| |
(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.
(catchsig, signal_handler, initial_action): Signal handlers return void,
not RETSIGTYPE, since we no longer support K&R.
(TABSIZE_OPTION): New constant.
(longopts, usage, main): New option --tabsize=COLUMNS.
(cleanup): New arg signo. All uses changed.
(ck_editor_status, main, edit): Don't worry about ENOEXEC.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
0 -> EXIT_SUCCESS, 1 -> EXIT_FAILURE, 2 -> EXIT_TROUBLE.
(ck_editor_status): New function.
(main): Check for stack overflow.
Adopt POSIX convention for subsidiary programs not found.
(diffarg): Check for integer overflow to avoid core dumps.
(trapsigs): Remove SA_INTERRUPT special case; now done by header.
(SIGCHLD): Likewise.
(edit): Adopt POSIX convention for subsidiary programs not found.
|
|
|
|
|
|
|
|
|
|
| |
(usage): Reformat messages to ease translation.
(handler_index_of_SIGINT, handler_index_of_SIGPIPE):
New macros.
(main): Do not confuse signal numbers with their indices.
Bug reported by Bruno Haible.
(edit): Cat lin to long before printing with %ld, since lin might
be narrow than long.
|
|
|
|
| |
terminating null character, not for a newline.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(DIFF_PROGRAM_OPTION): New constant.
(longopts, option_help_msgid, main): Add --diff-program=PROGRAM.
(check_stdout): New function.
(main): Remove DIFF_PROGRAM support. Check stdout after printing version.
Use check_stdout after printing help. Use execvp/perror_fatail rather
than execdiff. Set errno to 0 before invoking popen.
Check for pclose failure properly.
(main, edit): If child exec fails, exit with 127 rather than trying to
print diagnostic.
Distinguish between subsidiary program failing and not being found.
(edit): Handle signals the same way, regardless of whether we're using
system or fork+exec. Check for system returning -1.
|
|
|
|
|
|
|
| |
(expand_name): Use base_name rather than file_name_lastdirchar, for
portability to DOS.
(main): Initialize xalloc_exit_failure before possibly invoking any memory
allocator.
|
|
|
|
|
|
|
|
| |
HAVE_WORKING_VFORK.
(main): HAVE_VFORK -> HAVE_WORKING_VFORK.
(edit): Reopen the temporary file after the editor has run, in case
the editor operates by unlinking the old file and linking a new one.
(P_tmpdir): Rename from PVT_tmpdir; this fixes a typo. All uses changed.
|
|
|
|
|
| |
(longopts, option_help_msgid, main): Add -E, --ignore-tab-expansion,
--strip-trailing-cr.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
int -> bool for booleans.
int -> lin for line numbers.
Use angle-brackets when including getopt.h, quotesys.h.
Include error.h, freesoft.h, stdio.h, xalloc.h.
(copyright_string): Use only most recent year.
(authorship_msgid, option_help_msgid): Wrap in N_().
(tmpname): Now volatile.
(tmpmade): Remove.
(tmp): New var.
(private_tempnam, exists, letters): Remove.
(temporary_file): New function.
(edit): Use it.
(interact): Use strtoumax, not atoi.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(DIFF_PROGRAM, DEFAULT_EDITOR_PROGRAM): Remove.
(free_software_msgid, editor_program, not_found): New vars.
(diffbin, edbin): Remove.
(editor_program): Renamed from edbin.
(edit, interact): Now take extra string arg.
(exiterr, fatal, perror_fatal, try_help): Add noreturn attribute.
(sigset_t, sigemptyset, sigmask, sigaddset, SIG_BLOCK, SIG_SETMASK):
(sigprocmask): New macros, if !HAVE_SIGPROCMASK.
(error): Now has printf attribute.
(longopts, main): Don't assume ASCII.
(try_help): New operand arg.
(usage): Conform to new GNU standards.
(main): Set static vars for editor and diff program.
Compare getopt_long result to -1, not EOF.
-v conforms to new GNU standard.
Complain better about extra and missing operands.
If HAVE_VFORK, block SIGINT and SIGPIPE in the parent, since when
the child munges its handlers it may somp on the parent.
Pass rname to intract.
Translate not-found message before forking.
(give_help): Just output it all at once.
(edit): New args lname, lline, rname, rline.
(edit): New command 'd'.
(interact): New args lname, rname.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(DIFF_PROGRAM, DEFAULT_EDITOR_PROGRAM): Remove.
(free_software_msgid, editor_program, not_found): New vars.
(diffbin, edbin): Remove.
(editor_program): Renamed from edbin.
(edit, interact): Now take extra string arg.
(exiterr, fatal, perror_fatal, try_help): Add noreturn attribute.
(sigset_t, sigemptyset, sigmask, sigaddset, SIG_BLOCK, SIG_SETMASK):
(sigprocmask): New macros, if !HAVE_SIGPROCMASK.
(error): Now has printf attribute.
(longopts, main): Don't assume ASCII.
(try_help): New operand arg.
(usage): Conform to new GNU standards.
(main): Set static vars for editor and diff program.
Compare getopt_long result to -1, not EOF.
-v conforms to new GNU standard.
Complain better about extra and missing operands.
If HAVE_VFORK, block SIGINT and SIGPIPE in the parent, since when
the child munges its handlers it may somp on the parent.
Pass rname to intract.
Translate not-found message before forking.
(give_help): Just output it all at once.
(edit): New args lname, lline, rname, rline.
(edit): New command 'd'.
(interact): New args lname, rname.
|
|
|
|
|
|
|
| |
(option_help_msgid, help_msgid): New constant.
(usage, give_help): Use them, so message is translated one option at a time.
(main): Invoke setlocale first thing, to tell library we're internationalized.
(trapsigs): Ignore sigaction failure, to be compatible with `signal'.
|
| |
|
| |
|
|
|
|
| |
(diffarg): Take advantage of cleaner xrealloc semantics.
|
|
|
|
|
| |
(exists, letters): Omit if HAVE_TMPNAM.
(expand_name): Use filename_lastdirchar instead of strrchr.
|
|
|
|
| |
(private_tempnam): Specialize for sdiff to avoid portability problems.
|
|
|
|
|
|
|
|
|
|
| |
<ctype.h> now included by system.h.
(DEFAULT_EDITOR_PROGRAM): Renamed from DEFAULT_EDITOR for consistency.
(TMPDIR_ENV): New macro.
(expand_name): Change `isdir' to `is_dir' to avoid theoretical ctype
namespace contamination.
(main): Use SYSTEM_QUOTE_ARG.
(private_tempnam): Don't access "/tmp" directly; access it via PVT_tmpdir.
|
| |
|
| |
|
|
|
|
|
| |
(usage): Just print usage; let caller worry about exiting.
(memchr, waitpid): Remove; use new substitutes instead.
|