| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
int -> bool for booleans.
int -> lin for line numbers.
int -> size_t for sizes.
Use angle-brackets when including cmpbuf.h.
Include regex.h, xalloc.h.
(word): Remove; now done in system.h.
(hash_value): New type; use it instead of 'unsigned' for hash values.
(file_block_read): New function.
(sip, slurp): Use it. Now static.
(sip): Ensure block size is a multiple of word size. Clear eof flag.
(slurp): Use xalloc_die to report memory exhaustion.
(find_and_hash_each_line): Use TOLOWER instead of _tolower.
Add support for IGNORE_TAB_EXPANSION.
(prepare_text_end): Strip trailing CR if requested.
(find_identical_ends): Prepare the text only once, if they're duplicates.
Let the compiler take advantage more of the fact that the buffers are
word-aligned.
(primes): Remove.
(prime_offset): New var.
(read_var): Use prime_offset instead of primes.
Use zalloc instead of xmalloc + bzero.
|
|
|
|
|
|
|
|
| |
int -> lin for line numbers.
(format_group): Use strtoumax to parse line numbers.
(format_group, print_ifdef_lines): Use do_printf_spec to handle printf specs.
(groups_letter_value): Don't use _tolower; it's locale-dependent.
(do_printf_spec): Renamed from scan_printf_spec; now does the printing.
|
|
|
|
|
| |
int -> lin for line numbers (or 'long' when that's more convenient).
(print_ed_hunk): Fix bug when handling double-dot inserts.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
int -> bool for booleans.
Include error.h, exclude.h, xalloc.h.
(dir_sort): Return 0 on error, 1 on success. All callers changed.
compare_names -> compare_names_for_qsort.
(compare_names): Try strcasecmp if ignore_file_name_case. Then try
strcoll. Use file_name_cmp only as a last resort. Warn about
strcasecmp or strcoll failure.
(compare_names_for_qsort): New function.
(diff_dirs): Use compare_names rather than filename_cmp.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
int -> bool for booleans.
int -> lin for line numbers.
Don't include regex.h.
(enum changes): New enum.
(enum line_class): Remove; subsumed by enum changes.
(enum output_style): New constant OUTPUT_UNSPECIFIED.
(ignore_space_change_flag, ignore_all_space_flag): Remove.
(ignore_white_space): New decl, subsuming the above two. All uses changed.
Rename the following decls for consistency with user-visible
option spellings. All uses changed.
(text): Renamed from always_text_flag.
(ignore_blank_lines): Renamed from ignore_blank_lines_flag.
(ignore_case): Renamed from ignore_case_flag.
(brief): Renamed from no_details_flag.
(initial_tab): Renamed from tab_align_flag.
(expand_tabs): Renamed from tab_expand_flag.
(starting_file): Renamed from dir_start_file.
(paginate): Renamed from paginate_flag.
(sdiff_merge_assist): Renamed from sdiff_help_sdiff.
(left_column): Renamed from sdiff_left_only.
(suppress_common_lines): Renamed from sdiff_skip_common_lines.
(speed_large_files): Renamed from heuristic.
(minimal): Renamed from no_discards.
(inhibit_hunk_merge): Remove.
(strip_trailing_cr, excluded, time_format): New decls.
(files_can_be_treated_as_binary): Renamed from ignore_some_changes.
(group_format, line_format): Now char const *[], not char *[].
(struct file_data): Buffer is now word*, not char*, as it's always
aligned and this can help the compiler. buffered_chars -> buffered
(since it's a byte count, not a char count). All uses changed.
New member `eof'.
(FILE_BUFFER): New macro.
(excluded_filename, error, free_software_msgid): Remove decls; now in
other .h files.
(sip, slurp): Remove decls.
(file_block_read): New decl.
(change_letter): Now an array, not a function.
(lines_differ): Renamed from line_cmp.
(analyze_hunk): Now returns enum changes rather than two change counts.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
int -> bool for booleans.
long -> off_t for line numbers.
Use angle-brackets when including getopt.h, fnmatch.h, quotesys.h.
Include error.h, exclude.h, freesoft.h, hard-locale.h, prepargs.h,
regex.h, signal.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.
(binary): Renamed from binary_flag.
(new_file): Renamed from entire_new_file_flag.
(unidirectional_new_file): Renamed from unidirectional_new_file_flag.
(report_identical_files): Renamed from print_file_same_flag.
(numeric_arg): Remove.
(exclude, exclude_alloc, exclude_count, excluded_filename, add_exclude,
add_exclude_file):
Remove; now done by exclude.h.
(BINARY_OPTION, FROM_FILE_OPTION, HELP_OPTION, HORIZON_LINES_OPTION,
IGNORE_FILE_NAME_CASE_OPTION, INHIBIT_HUNK_MERGE_OPTION,
LEFT_COLUMN_OPTION, LINE_FORMAT_OPTION, NORMAL_OPTION,
SDIFF_MERGE_ASSIST_OPTION, STRIP_TRAILING_CR_OPTION,
SUPPRESS_COMMON_LINES_OPTION, TO_FILE_OPTION,
UNCHANGED_LINE_FORMAT_OPTION, OLD_LINE_FORMAT_OPTION,
NEW_LINE_FORMAT_OPTION, UNCHANGED_GROUP_FORMAT_OPTION,
OLD_GROUP_FORMAT_OPTION, NEW_GROUP_FORMAT_OPTION,
CHANGED_GROUP_FORMAT_OPTION): New constants.
(longopts, main): Use them.
(longopts, main, option_help_msgid): Add -E, --from-file, --to-file.
(main): Invoke bindtextdomain and textdomain after setlocale.
Use grep syntax, not Emacs, for regular expressions.
Use exclude.h, not our own functions.
Use ISO 8601 time format in hard locales.
Prepend DIFF_OPTIONS.
Don't update ignore_some_changes.
Use strtoumax instead of numeric_arg.
Use specify_value when appropriate.
error -> try_help when appropriate.
-p now means ^[[:alpha:]$_], not ^[_a-zA-Z$].
Ignore --inhibit-hunk-merge.
Prefer changed group formats to unchanged ones.
Remove now-unnecessary casts.
Set files_can_be_treated_as_binary.
(specify_value): Renamed from specify_format. All uses changed.
(specify_style): Default is now unspecified, not normal. All uses changed.
(set_mtime_to_now): New function.
(compare_files): Use it. Use memset, not bzero.
Set stdin mtime to current time even when stdin is not a regular file.
Check for same file attributes, as well as for same file.
Use files_can_be_treated_as_binary.
"write failed" -> "standard output on output failure.
|
|
|
|
|
|
|
|
|
|
|
|
| |
int -> lin for line numbers.
Include inttostr.h, regex.h.
(TIMESPEC_NS): New macro.
(nstrftime): New decl.
(print_context_label): Use nstrftime and time_format to format times.
Print numeric time stamp value if localtime fails.
(print_context_function): New function.
(pr_context_hunk, pr_unidiff_hunk): Use it.
(find_function): Use size_t for sizes, not int.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
int -> bool for booleans.
long -> off_t for line numbers.
Use angle-brackets when including cmpbuf.h, getopt.h.
Include error.h, freesoft.h, inttostr.h, xalloc.h.
(copyright_string): Use only most recent year.
(authorship_msgid): Wrap in N_().
(buffer): Now word*, not char*. All uses changed.
(word): Remove macro; now in system.h.
(long_options, option_help_msgid, main): -c --print-chars -> -b --print-bytes
(check_stdout): "write failed" -> "standard output"
(option_help_msgid): Wrap in N_().
(main): Invoke bindtextdomain and textdomain after setlocale.
Use strtoumax instead of doing the work ourselves.
Check for same_file_attributes as well as same_file.
(cmp): Use ssize_t for read returns, not size_t.
Do not assume that size_t is not narrower than int.
Do not assume that line numbers fit in 'long'.
(block_compare_and_count, block_compare):
Compiler now checks that buffers are word-aligned.
(block_compare_and_count): Count sizes with size_t, not long.
(sprintc): byte arg is unsigned char, not unsigned.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
int -> lin for line numbers.
int -> bool for booleans.
unsigned int -> size_t for sizes.
Use angle-brackets when including cmpbuf.h.
Include error.h, regex.h, xalloc.h.
(discard_confusing_lines, diff_2_files): Use zalloc rather than xalloc+bzero.
(discard_confusing_lines): unsigned int -> lin for values that are really
line numbers.
(shift_boundaries): Do not inhibit hunk merges.
(build_reverse_script, build_script, diff_2_files): Use |, not ||, for speed.
(diff_2_files): no_details_flag & ~ignore_some_changes ->
files_can_be_treated_as_binary. Esure that buffer size is a multiple
of sizeof (word). Use file_block_read to read buffers.
(diff_2_files): Abort if output style is not one of the expected styles.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
(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.
|
|
|
|
|
|
|
|
|
|
| |
(getenv): Don't declare if HAVE_STDLIB_H.
(CHAR_MAX): New macro.
(<locale.h>): New include.
(<locale.h>): Include before <libintl.h>.
(could_be_mvfs_stat_bug, could_be_nfs_stat_bug, dev_may_have_duplicate_ino,
same_special_file): New macros.
(same_file): Use them.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(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.
|
| |
|
|
|
|
| |
(slurp): Check for arithmetic overflow when computing buffer size.
|
| |
|
|
|
|
|
| |
Arg is now struct comparison const *.
(dir_loop): New function
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(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'
|
|
|
|
|
|
|
|
|
|
|
| |
(struct filedata): Remove dir_p arg.
(struct comparison): New type.
(diff_2_files, diff_dirs)" Ise ot/
(error): Add printf attribute if applicable.
(free_software_msgid): New decl.
(pr_program): New decl.
(fatal): Add noreturn attribute.
(pfatal_with_name): Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(quotesys.h): Include.
(ck_atoi): Remove.
(function_regexp_list, ignore_regexp_list): Now static.
(binary_flag): Renamed from binary_I_O.
(entire_new_file_flag, unidirectional_new_file_flag, print_file_same_flag):
Now static.
(numeric_arg): Renamed from ck_atoi.
New argument specifying the argument type.
(longopts, main): Don't assume ASCII.
(longopts): Remove old aliases --file-label, --entire-new-file, --ascii,
--print.
(main): Check for -1, not EOF, when calling getopt_long.
Use numeric_arg to report errors.
Report error if -l specified but pagination is not supported.
Report error if -S is specified twice with conflicting values.
Have --version conform to the new GNU standards.
Add new --from-file, --to-file, --inhibit-hun,-merge options.
Make the horizon at least as large as the context.
Add casts to pacify gcc -Wall.
(try_help): Add operand arg.
(option_help_msgid): Doc fix to match above.
(usage): Indent option_help_msgid.
(compare_files): Now takes struct comparison
instead of two directory names and a depth.
(NONEXISTENT, UNOPENED, ERRNO_ENCODE, ERRNO_DECODE):
New macros.
(DIR_P): New macro.
Report error if fflush does.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(free_software_msgid): New decl.
(error): Now has printf attribute.
(try_help): Likewise.
(long_options): Don't assume ASCII.
(try_help): Now accepts operand arg.
(main): Check for -1, not EOF, when calling getopt_long.
Report --ignore-initial value when complaining about it.
Output copyright and free software info with -v.
Don't assume ASCII.
Report last operand when one is missing.
Report text of extra operand.
Move block_read into cmpbuf.c.
|
|
|
|
|
| |
Arg is now struct comparison const *.
(dir_loop): 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.
|
|
|
|
|
|
|
|
|
|
| |
(getenv): Don't declare if HAVE_STDLIB_H.
(CHAR_MAX): New macro.
(<locale.h>): New include.
(<locale.h>): Include before <libintl.h>.
(could_be_mvfs_stat_bug, could_be_nfs_stat_bug, dev_may_have_duplicate_ino,
same_special_file): New macros.
(same_file): Use them.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(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.
|
| |
|
|
|
|
| |
(slurp): Check for arithmetic overflow when computing buffer size.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(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'
|
|
|
|
|
|
|
|
|
|
|
| |
(struct filedata): Remove dir_p arg.
(struct comparison): New type.
(diff_2_files, diff_dirs)" Ise ot/
(error): Add printf attribute if applicable.
(free_software_msgid): New decl.
(pr_program): New decl.
(fatal): Add noreturn attribute.
(pfatal_with_name): Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(quotearg.h): Include.
(ck_atoi): Remove.
(function_regexp_list, ignore_regexp_list): Now static.
(binary_flag): Renamed from binary_I_O.
(entire_new_file_flag, unidirectional_new_file_flag, print_file_same_flag):
Now static.
(numeric_arg): Renamed from ck_atoi.
New argument specifying the argument type.
(longopts, main): Don't assume ASCII.
(longopts): Remove old aliases --file-label, --entire-new-file, --ascii,
--print.
(main): Check for -1, not EOF, when calling getopt_long.
Use numeric_arg to report errors.
Report error if -l specified but pagination is not supported.
Report error if -S is specified twice with conflicting values.
Have --version conform to the new GNU standards.
Add new --from-file, --to-file, --inhibit-hun,-merge options.
Make the horizon at least as large as the context.
Add casts to pacify gcc -Wall.
(try_help): Add operand arg.
(option_help_msgid): Doc fix to match above.
(usage): Indent option_help_msgid.
(compare_files): Now takes struct comparison
instead of two directory names and a depth.
(NONEXISTENT, UNOPENED, ERRNO_ENCODE, ERRNO_DECODE):
New macros.
(DIR_P): New macro.
Report error if fflush does.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(free_software_msgid): New decl.
(error): Now has printf attribute.
(try_help): Likewise.
(long_options): Don't assume ASCII.
(try_help): Now accepts operand arg.
(main): Check for -1, not EOF, when calling getopt_long.
Report --ignore-initial value when complaining about it.
Output copyright and free software info with -v.
Don't assume ASCII.
Report last operand when one is missing.
Report text of extra operand.
Move block_read into cmpbuf.c.
|
|
|
|
|
|
|
|
|
| |
(inhibit): Remove.
(shift_boundaries): Don't inhibit. If inhibit_hunk_merge is nonzero,
don't merge hunks.
(briefly_report): Now returns 2 if trouble, CHANGES otherwise.
(diff_2_files): Now takes struct comparison. If briefly_report reports
trouble, pass it on to caller.
|
|
|
|
| |
to save a messsage.
|
|
|
|
| |
(setlocale): Declare; use a stub if ! HAVE_LOCALE_H.
|
|
|
|
|
|
|
| |
(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'.
|
|
|
|
|
| |
(option_help_msgid): New constant.
(usage): Use it, so message is translated one option at a time.
|
|
|
|
|
|
|
| |
-D FOO now outputs `/* ! FOO */ instead of `/* not FOO */'.
(option_help_msgid): New constant.
(usage): Use it, so message is translated one option at a time.
(compare_files): For label, use file_label if set.
|
|
|
|
|
|
|
| |
(option_help_msgid): New constant.
(usage): Use it, so message is translated one option at a time.
(sprintc): Renamed from `printc'. Now outputs to a buffer instead of stdout.
(cmp): Use new sprintc semantics.
|
|
|
|
|
| |
`if (A) message ("B") : message ("C")'; this is for getmsgids.
(briefly_report, diff_2_files): For label, use file_label if set.
|
| |
|
|
|
|
|
|
|
|
|
| |
(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.
|