| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
|
|
|
|
|
|
|
|
| |
introduced in the 2001-11-25 change: the code to remove the
identical suffix also looked at the trailing sentinel, which meant
the common suffix length was always incorrectly calculated to be
zero. Problem and fix reported by Daniel Hipschman. Instead of
his fix, revert to the (nearly-equivalent) pre-2001 code.
|
| |
|
|
|
|
|
|
|
|
|
| |
(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.
|
| |
|
| |
|
|
|
|
|
| |
(main): Use it to avoid bug when the "EOF on foo" message is
generated and stdout is /dev/null.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
report_identical_files): Move into struct diffopt. All uses changed.
(exclude_options, compare_files, specify_style, check_stdout):
New arg OPT. All uses changed.
(GDIFF_MAIN): Remove. All uses removed.
(function_regexp_list, ignore_regexp_list): No longer static; now
locals in 'main'.
(main): Set opt.function_regexp, opt.ignore_regexp if using regexps;
all other code now tests these pointers rather than inspecting fastmap
internals.
New local OPT to hold former statics; initialize it.
(init_regexp_list): New function, used by main.
(summarize_regexp_list): Now returns struct re_pattern_buffer *, and
assumes reglist->regexps is not NULL. All uses changed.
|
|
|
|
|
|
|
|
|
| |
All uses changed.
(pr_context_label, pr_context_header,
print_context_script, find_function, find_hunk, mark_ignorable,
pr_context_hunk, pr_unidiff_hunk): New arg OPT. All uses changed.
(print_context_number_range,
print_unidiff_number_range): New arg OUT. All uses changed.
|
| |
|
|
|
|
| |
last line is a single-dot line.
|
| |
|
|
|
|
|
| |
Include setmode.h first, to catch interface errors.
Assume HAVE_SETMODE_DOS is defined.
|
| |
|
| |
|
|
|
|
| |
which operates with read-only directories.
|
|
|
|
| |
Remove config/config.rpath as it is deduced automatically these days.
|
| |
|
|
|
|
|
|
| |
(XGETTEXT): Restore from pre-2004-04-12 version. This fixes
a bug that lost many msgids in doc/diffutils.pot.
(AC_INIT): Version 2.8.7.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(AC_CONFIG_MACRO_DIR): Add call, specifying "m4".
(AC_CONFIG_HEADER): Replaces AM_CONFIG_HEADER.
(gl_USE_SYSTEM_EXTENSIONS): Replaces AC_GNU_SOURCE.
(AC_ISC_POSIX): Remove; nobody ports to ancient ISC any more.
(AC_PROG_CPP, AC_PROG_INSTALL, AC_C_INLINE,
AC_HEADER_STDBOOL, AC_HEADER_STDC, AM_GNU_GETTEXT, XGETTEXT,
AC_HEADER_STAT, AC_FUNC_VPRINTF, jm_FUNC_GLIBC_UNLOCKED_IO,
jm_FUNC_GNU_STRFTIME, jm_FUNC_MALLOC, jm_FUNC_REALLOC,
jm_PREREQ_C_STACK, jm_PREREQ_ERROR, jm_PREREQ_HARD_LOCALE,
jm_PREREQ_QUOTEARG, jm_PREREQ_REGEX, AC_FUNC_FNMATCH_GNU, jm_AC_DOS):
Remove; not needed here, as our files don't use them directly
or we rely on gnulib modules.
(AC_C_CONST): Remove; we assume C89 now.
(AC_CHECK_HEADERS): Remove libintl.h, limits.h, stdlib.h, string.h,
time.h.
(AC_CHECK_TYPE): Remove ptrdiff_t, ssize_t.
(AC_CHECK_FUNCS): Remove diraccess, strchr, strerror, tmpnam).
(AC_REPLACE_FUNCS): Remove memchr, mkstemp, strcasecmp.
(GNULIB_AUTOCONF_SNIPPET): Add call. This replaces much of
the above.
(AC_CONFIG_FILES): Remove lib/posix/Makefile.
|
| |
|
|
|
|
| |
--help" for special "configure" options. Suggest latest libiconv. Update version numbers of Autoconf etc. to current.
|
| |
|
|
|
|
|
|
| |
(lines_differ): Don't convert char * to unsigned char *;
just leave pointers as char *. This lessens the number of
potentially-dangerous casts.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(S_IXUSR, S_IXGRP, S_IXOTH): Remove.
Include <time.h> unconditionally, since we can assume C89 now.
Likewise for <stdlib.h>, <string.h>.
(getenv, EXIT_SUCCESS, EXIT_FAILURE, SSIZE_MAX, strchr, strrchr,
memcmp, memcpy): Remove decl; no longer needed.
(strcasecoll, strcasecmp): Define if not built in.
(CTYPE_DOMAIN, ISPRINT, ISSPACE, TOLOWER, _tolower, errno): Remove;
we now assume C89 or better. All uses changed.
Include <stdbool.h> unconditionally now, since gnulib supports it
if the C compiler doesn't. All boolean uses of 0 and 1 now
changed to false and true.
(lin_is_printable_as_long_int): Renamed from lin_is_printable_as_long.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
(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.
|
|
|
|
|
|
| |
(find_and_hash_each_line): Don't convert char *
to unsigned char *; just leave pointers as char *. This
lessens the number of potentially-dangerous casts.
|
|
|
|
|
|
| |
(next_line0, next_line1): New vars.
(print_ifdef_script, print_ifdef_hunk):
Use them to fix line-number computation bug.
|
| |
|
|
|
|
|
|
|
|
| |
(failed_locale_specific_sorting): Renamed from failed_strcoll.
All uses changed.
(compare_names): Don't invoke strcasecmp first thing when
ignore_file_name_case; if locale_specific_sorting, we should
just use that.
|
|
|
|
|
|
|
|
|
|
|
|
| |
(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.
|
|
|
|
|
|
| |
(struct file_data.changed): Now char *, not bool *, to save
space on hosts where bool takes more space than char.
All uses changed.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(option_help_msgid): Mention exit status.
(main): Adjust to latest gnulib c_stack_action calling conventions.
Adjust to latest version_etc calling conventions.
Include <exit.h>.
(binary): Define to true if not declared.
(longopts): Set tabsize flag to 1.
(main): Don't output nanoseconds if platform lacks them.
Don't treat files as binary if !binary.
(set_mtime_to_now): Use 0, not NULL.
(compare_files): Mark files as nonexistent if it looks like
'patch' created inaccessible regular empty files to denote
nonexistent backups. Don't compare such files.
Clear st_* members of status of nonexistent file.
Remove now-unnecessary tests.
|
| |
|
|
|
|
|
|
|
|
| |
(specify_comparison_type): Don't report an error if the comparison
type has already been specified the same way as this one.
(usage): Mention exit status.
(main): Adjust to latest gnulib c_stack_action calling conventions.
(main): Adjust to latest version_etc calling conventions.
|
|
|
|
|
|
|
|
|
| |
(EXTRA_DIST, noinst_HEADERS): Remove most entries.
(libdiffutils_a_SOURCES): Now just lib_SOURCES.
(lib_SOURCES): New macro.
(DISTCLEANFILES, MOSTLYCLEANFILES): Set to empty now.
(gnulib.mk): Include: this does most of the work eliminated
by the above changes.
|
| |
|
|
|
|
|
|
| |
(set_binary_mode): Define only if HAVE_SETMODE_DOS.
Otherwise define a dummy static char, as C89 requires
that we define something.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
| |
value wasn't needed. All callers changed.
(diag, diff_2_files):
Use 'true' and 'false' instead of '1' and '0', when appropriate.
(compareseq): Use lin const * local variables instead of lin *.
Don't bother checking diag's return value.
(shift_boundaries, build_reverse_script, build_script, diff_2_files):
Use char arrays, not bool arrays, since
sizeof (bool) might be greater than 1.
|
| |
|