summaryrefslogtreecommitdiff
path: root/src/diff.h
Commit message (Collapse)AuthorAgeFilesLines
* New option --no-dereference.Bruno Haible2012-01-081-0/+4
| | | | | | | | | | | | | | | * src/diff.h (no_dereference_symlinks): New variable. * src/diff.c: Include xreadlink.h. (longopts): Add --no-dereference option. (main): Accept --no-dereference option. (option_help_msgid): Mention the --no-dereference option. (compare_files): If no_dereference_symlinks is true, use lstat() instead of stat(). Compare symbolic links by comparing their values. * bootstrap.conf (gnulib_modules): Add lstat, stat, xreadlink. * doc/diffutils.texi (Comparing Directories, diff Options): Mention the --no-dereference option. * tests/no-dereference: New file. * tests/Makefile.am (TESTS): Add it.
* maint: update all copyright year number rangesJim Meyering2012-01-011-1/+1
| | | | Run "make update-copyright".
* build: update to latest gnulib and adaptJim Meyering2011-12-141-1/+1
| | | | | | | | | | | | | | | | | * 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.
* maint: avoid new "make sytnax-check" failure.Jim Meyering2011-08-151-1/+1
| | | | | * src/diff.h (find_dir_file_pathname): Mark declaration with "extern" keyword, in order to placate the tight-scope syntax check.
* diff, sdiff: new option --ignore-trailing-space (-Z)Roland McGrath2011-08-141-0/+8
| | | | | | | | | | | | | | 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.
* diff: --ignore-file-name-case now applies at top level tooTim Waugh2011-08-131-0/+1
| | | | | | | | | | | Derived from Tim Waugh's patch in: http://lists.gnu.org/archive/html/bug-diffutils/2011-08/msg00034.html * NEWS, doc/diffutils.texi (diff Options): Document this. * src/diff.c (compare_files): Implement this, by using find_dir_file_pathname. * src/diff.h (find_dir_file_pathname): New decl. * src/dir.c: Include filenamecat.h. (find_dir_file_pathname): New function.
* maint: prepare for the tight-scope checkJim Meyering2011-05-181-36/+43
| | | | | | | | | | * src/diff.h: Mark function declarations with "extern" in preparation for the tight-scope check. (ignore_white_space): Separate enum decl from declaration of this variable. * src/Makefile.am (diff_SOURCES): Move diff.h from here to ... (noinst_HEADERS): ...here. For convenience, since the tight-scope rule uses $(noinst_HEADERS).
* maint: update copyright year ranges to include 2011Jim Meyering2011-01-031-1/+1
| | | | Run "make update-copyright", so "make syntax-check" works in 2011.
* diff -r: avoid printing excess slashes in concatenated file namesJim Meyering2010-08-141-1/+0
| | | | | | | | | | | | * 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.
* maint: update all FSF copyright year lists to include 2010Jim Meyering2010-01-011-1/+1
| | | | | | Use this command: git ls-files |grep -vE '^(\..*|COPYING|gnulib)$' |xargs \ env UPDATE_COPYRIGHT_USE_INTERVALS=1 build-aux/update-copyright
* admin: update all copyright notices to include the year 2009Jim Meyering2009-11-111-2/+2
|
* build: rely on gnulib's progname moduleJim Meyering2009-11-111-3/+0
| | | | | | | | | | | | * 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.
* * NEWS: New diff option --suppress-blank-empty (no longer -u default).Paul Eggert2009-11-111-0/+3
| | | | | | | | | | | | * 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.
* * COPYING: New file.Paul Eggert2007-07-191-7/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* Update FSF address.Paul Eggert2006-01-051-1/+1
|
* Include regex.h, unlocked-io.h.Paul Eggert2004-04-121-4/+6
| | | | | | (struct file_data.changed): Now char *, not bool *, to save space on hosts where bool takes more space than char. All uses changed.
* (version_string): Remove decl.Paul Eggert2002-06-171-3/+0
|
* (TAB_WIDTH): Remove.Paul Eggert2002-06-111-4/+5
| | | | | | (tabsize): New decl. (sdiff_half_width, sdiff_column2_offset): Now size_t rather than unsigned int.
* -L -> --labelPaul Eggert2002-03-121-1/+1
|
* unsigned -> unsigned int.Paul Eggert2002-02-281-10/+14
|
* Assume C89 or better.Paul Eggert2001-11-241-119/+147
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* (XTERN): Renamed from EXTERN.Paul Eggert1998-09-141-1/+1
| | | | | | | | | | | (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.
* (XTERN): Renamed from EXTERN.Paul Eggert1998-09-131-65/+73
| | | | | | | | | | | (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.
* (function_regexp, ignore_regexp): Replace lists of compiled regexps withPaul Eggert1994-10-311-9/+3
| | | | | these single compiled regexps. (regexp_list, function_regexp_list, ignore_regexp_list): Moved to diff.c.
* (ignore_some_line_changes): Removed. All users changed.Paul Eggert1994-10-151-20/+21
| | | | | | (error): Change to GNU library standard. All callers changed. (xmalloc_exit_failure): New variable. xmalloc and xrealloc are now taken from GNU library. All `main' programs set this variable at the start.
* <ctype.h> now included by system.h.Paul Eggert1994-09-221-5/+0
| | | | (PR_FILE_NAME): Rename to PR_PROGRAM and move to Makefile.in, util.c.
* (program_name): Renamed from `program', for consistency.Paul Eggert1994-09-151-1/+1
|
* (ignore_some_line_changes): New variable; replaces `length_varies'.Paul Eggert1994-09-121-6/+3
| | | | | (line_end_char): Removed; it wasn't being used consistently. (line_cmp): Now takes just pointers to two lines.
* GNU diffutils 2.6Paul Eggert1993-09-171-1/+1
|
* (group_format, line_format): No longer const pointers.Paul Eggert1993-09-131-4/+4
|
* Add prototypes to function declarations. Use size_t, not int, when needed.Paul Eggert1993-08-271-66/+75
| | | | | | | | | Use `const' when needed to pacify gcc. (Is_space, textchar): Remove. (struct msg, msg_chain, msg_chain_end): Move to util.c. (VOID): Move to system.h. (line_cmp, version_string, change_letter, print_number_range, find_change): New decls.
* (ignore_some_changes): New variable.Paul Eggert1993-05-221-0/+4
|
* entered into RCSPaul Eggert1993-04-231-0/+3
|
* *** empty log message ***Paul Eggert1992-09-301-10/+15
|
* *** empty log message ***Paul Eggert1992-09-281-2/+6
|
* *** empty log message ***Paul Eggert1992-09-271-0/+4
|
* *** empty log message ***Paul Eggert1992-09-241-4/+4
|
* *** empty log message ***David MacKenzie1992-09-121-3/+0
|
* *** empty log message ***Paul Eggert1992-09-061-31/+21
|
* *** empty log message ***David MacKenzie1992-09-031-4/+1
|
* Initial revisionDavid MacKenzie1992-07-071-0/+335