118fd37a7SXin LI2004-04-13 Paul Eggert <eggert@twinsun.com> 218fd37a7SXin LI 318fd37a7SXin LI * NEWS, configure.ac (AC_INIT): Version 2.8.7. 418fd37a7SXin LI * configure.ac (AM_GNU_GETTEXT_VERSION): Add. 518fd37a7SXin LI (XGETTEXT): Restore from pre-2004-04-12 version. This fixes 618fd37a7SXin LI a bug that lost many msgids in doc/diffutils.pot. 718fd37a7SXin LI * bootstrap: New file. 818fd37a7SXin LI * exgettext: Don't generate a temporary file, as this runs afoul 918fd37a7SXin LI of "make distcheck" which operates with read-only directories. 1018fd37a7SXin LI * Makefile.am (EXTRA_DIST): Add bootstrap. 1118fd37a7SXin LI Remove config/config.rpath as it is deduced automatically these days. 1218fd37a7SXin LI 1318fd37a7SXin LI2004-04-12 Paul Eggert <eggert@twinsun.com> 1418fd37a7SXin LI 1518fd37a7SXin LI * NEWS, configure.ac (AC_INIT): Version 2.8.6. 1618fd37a7SXin LI 1718fd37a7SXin LI * NEWS: Add news for 2.8.4, 2.8.6. 1818fd37a7SXin LI 1918fd37a7SXin LI * README: Move copyright notice to end. Defer to "configure 2018fd37a7SXin LI --help" for special "configure" options. Suggest latest libiconv. 2118fd37a7SXin LI Update version numbers of Autoconf etc. to current. 2218fd37a7SXin LI 2318fd37a7SXin LI * configure.ac: Quote various arguments better. 2418fd37a7SXin LI (AC_CONFIG_MACRO_DIR): Add call, specifying "m4". 2518fd37a7SXin LI (AC_CONFIG_HEADER): Replaces AM_CONFIG_HEADER. 2618fd37a7SXin LI (gl_USE_SYSTEM_EXTENSIONS): Replaces AC_GNU_SOURCE. 2718fd37a7SXin LI (AC_ISC_POSIX): Remove; nobody ports to ancient ISC any more. 2818fd37a7SXin LI (AC_PROG_CPP, AC_PROG_INSTALL, AC_C_INLINE, 2918fd37a7SXin LI AC_HEADER_STDBOOL, AC_HEADER_STDC, AM_GNU_GETTEXT, XGETTEXT, 3018fd37a7SXin LI AC_HEADER_STAT, AC_FUNC_VPRINTF, jm_FUNC_GLIBC_UNLOCKED_IO, 3118fd37a7SXin LI jm_FUNC_GNU_STRFTIME, jm_FUNC_MALLOC, jm_FUNC_REALLOC, 3218fd37a7SXin LI jm_PREREQ_C_STACK, jm_PREREQ_ERROR, jm_PREREQ_HARD_LOCALE, 3318fd37a7SXin LI jm_PREREQ_QUOTEARG, jm_PREREQ_REGEX, AC_FUNC_FNMATCH_GNU, jm_AC_DOS): 3418fd37a7SXin LI Remove; not needed here, as our files don't use them directly 3518fd37a7SXin LI or we rely on gnulib modules. 3618fd37a7SXin LI (AC_C_CONST): Remove; we assume C89 now. 3718fd37a7SXin LI (AC_CHECK_HEADERS): Remove libintl.h, limits.h, stdlib.h, string.h, 3818fd37a7SXin LI time.h. 3918fd37a7SXin LI (AC_CHECK_TYPE): Remove ptrdiff_t, ssize_t. 4018fd37a7SXin LI (AC_CHECK_FUNCS): Remove diraccess, strchr, strerror, tmpnam). 4118fd37a7SXin LI (AC_REPLACE_FUNCS): Remove memchr, mkstemp, strcasecmp. 4218fd37a7SXin LI (GNULIB_AUTOCONF_SNIPPET): Add call. This replaces much of 4318fd37a7SXin LI the above. 4418fd37a7SXin LI (AC_CONFIG_FILES): Remove lib/posix/Makefile. 4518fd37a7SXin LI (AC_CONFIG_COMMANDS): Remove. 4618fd37a7SXin LI 4718fd37a7SXin LI * doc/diff.texi (dircategory): Change to "Text creation and 4818fd37a7SXin LI manipulation" from "GNU packages". 4918fd37a7SXin LI (Translations): New node. 5018fd37a7SXin LI (Overview): Improve quality of algorithm citations. 5118fd37a7SXin LI (Binary): -q doesn't exactly cause diff to assume files are binary. 5218fd37a7SXin LI (Normal): Place after Side by Side, since it's less important. 5318fd37a7SXin LI (Detailed Context, Detailed Unified, Detailed ed, 5418fd37a7SXin LI Detailed if-then-else, diff3 Hunks, Detailed diff3 Normal): 5518fd37a7SXin LI Place at end of menu. 5618fd37a7SXin LI (Detailed Unified): Mention that fractional timestamps are 5718fd37a7SXin LI omitted on hosts that don't support them. 5818fd37a7SXin LI Mention what happens when hunks contain just one line. 5918fd37a7SXin LI (Line Group Formats, Reject Names): Fix duplicate-word typos. 6018fd37a7SXin LI (Comparing Directories): Trailing white space and empty lines are 6118fd37a7SXin LI ignored in the -X file. 6218fd37a7SXin LI (diff Options): Add --strip-trailing-cr. 6318fd37a7SXin LI (Projects): gnu -> gvc@gnu.org. 6418fd37a7SXin LI 6518fd37a7SXin LI * lib/Makefile.am (SUBDIRS): Remove. 6618fd37a7SXin LI (EXTRA_DIST, noinst_HEADERS): Remove most entries. 6718fd37a7SXin LI (libdiffutils_a_SOURCES): Now just lib_SOURCES. 6818fd37a7SXin LI (lib_SOURCES): New macro. 6918fd37a7SXin LI (DISTCLEANFILES, MOSTLYCLEANFILES): Set to empty now. 7018fd37a7SXin LI (gnulib.mk): Include: this does most of the work eliminated 7118fd37a7SXin LI by the above changes. 7218fd37a7SXin LI 7318fd37a7SXin LI * lib/inttostr.c (inttostr): Protect i < 0 by compile-time 7418fd37a7SXin LI test intended to suppress compiler warnings. 7518fd37a7SXin LI * lib/inttostr.h: Include limits.h unilaterally. 7618fd37a7SXin LI (CHAR_BIT): Remove. 7718fd37a7SXin LI (PARAMS): Remove; all uses changed. 7818fd37a7SXin LI * lib/setmode.c (__attribute__): New macro. 7918fd37a7SXin LI (set_binary_mode): Define only if HAVE_SETMODE_DOS. 8018fd37a7SXin LI Otherwise define a dummy static char, as C89 requires 8118fd37a7SXin LI that we define something. 8218fd37a7SXin LI * lib/setmode.h (set_binary_mode): Return true, not 1. 8318fd37a7SXin LI 8418fd37a7SXin LI * src/analyze.c, src/context.c, src/diff.c, src/io.c, src/util.c: 8518fd37a7SXin LI Do not include regex.h, as diff.h does this now. 8618fd37a7SXin LI 8718fd37a7SXin LI * src/cmp.c: Sort includes. Include <exit.h>, <unlocked-io.h>. 8818fd37a7SXin LI (specify_comparison_type): Don't report an error if the comparison 8918fd37a7SXin LI type has already been specified the same way as this one. 9018fd37a7SXin LI 9118fd37a7SXin LI * src/cmp.c (usage): Mention exit status. 9218fd37a7SXin LI * src/diff.c (option_help_msgid): Likewise. 9318fd37a7SXin LI * src/diff3.c (usage): Likewise. 9418fd37a7SXin LI * src/sdiff.c (usage): Likewise. 9518fd37a7SXin LI 9618fd37a7SXin LI * src/cmp.c (main): Adjust to latest gnulib c_stack_action 9718fd37a7SXin LI calling conventions. 9818fd37a7SXin LI * src/diff.c (main): Likewise. 9918fd37a7SXin LI * src/diff3.c (main): Likewise. 10018fd37a7SXin LI * src/sdiff.c (main): Likewise. 10118fd37a7SXin LI 10218fd37a7SXin LI * src/cmp.c (main): Adjust to latest version_etc calling conventions. 10318fd37a7SXin LI * src/diff.c (main): Likewise. 10418fd37a7SXin LI * src/diff3.c (main): Likewise. 10518fd37a7SXin LI * src/sdiff.c (main): Likewise. 10618fd37a7SXin LI 10718fd37a7SXin LI * src/diff.c: Include <exit.h>. 10818fd37a7SXin LI (binary): Define to true if not declared. 10918fd37a7SXin LI (longopts): Set tabsize flag to 1. 11018fd37a7SXin LI (main): Don't output nanoseconds if platform lacks them. 11118fd37a7SXin LI Don't treat files as binary if !binary. 11218fd37a7SXin LI (set_mtime_to_now): Use 0, not NULL. 11318fd37a7SXin LI (compare_files): Mark files as nonexistent if it looks like 11418fd37a7SXin LI 'patch' created inaccessible regular empty files to denote 11518fd37a7SXin LI nonexistent backups. Don't compare such files. 11618fd37a7SXin LI Clear st_* members of status of nonexistent file. 11718fd37a7SXin LI Remove now-unnecessary tests. 11818fd37a7SXin LI 11918fd37a7SXin LI * src/diff.h: Include regex.h, unlocked-io.h. 12018fd37a7SXin LI (struct file_data.changed): Now char *, not bool *, to save 12118fd37a7SXin LI space on hosts where bool takes more space than char. 12218fd37a7SXin LI All uses changed. 12318fd37a7SXin LI 12418fd37a7SXin LI * src/diff3.c: Include unlocked-io.h. 12518fd37a7SXin LI (strip_trailing_cr): New var. 12618fd37a7SXin LI (STRIP_TRAILING_CR_OPTION): New enum. 12718fd37a7SXin LI (longopts, main, option_help_msgid, read_diff): 12818fd37a7SXin LI Add --strip-trailing-cr support. 12918fd37a7SXin LI (read_diff): Exit with status 126 (not 127) if errno != ENOENT 13018fd37a7SXin LI after failed execvp in child. Report this in parent. 13118fd37a7SXin LI 13218fd37a7SXin LI * src/dir.c: Include <strcase.h>. 13318fd37a7SXin LI (failed_locale_specific_sorting): Renamed from failed_strcoll. 13418fd37a7SXin LI All uses changed. 13518fd37a7SXin LI (compare_names): Don't invoke strcasecmp first thing when 13618fd37a7SXin LI ignore_file_name_case; if locale_specific_sorting, we should 13718fd37a7SXin LI just use that. 13818fd37a7SXin LI 13918fd37a7SXin LI * src/ifdef.c (next_line): Remove; replace with... 14018fd37a7SXin LI (next_line0, next_line1): New vars. 14118fd37a7SXin LI (print_ifdef_script, print_ifdef_hunk): 14218fd37a7SXin LI Use them to fix line-number computation bug. 14318fd37a7SXin LI 14418fd37a7SXin LI * src/io.c (find_and_hash_each_line): Don't convert char * 14518fd37a7SXin LI to unsigned char *; just leave pointers as char *. This 14618fd37a7SXin LI lessens the number of potentially-dangerous casts. 14718fd37a7SXin LI * src/util.c (lines_differ): Likewise. 14818fd37a7SXin LI 14918fd37a7SXin LI * src/sdiff.c: Include <unlocked-io.h>, <exit.h>. 15018fd37a7SXin LI (check_child_status): Renamed from ck_editor_status, and 15118fd37a7SXin LI accept a new arg MAX_OK_STATUS. All callers changed. 15218fd37a7SXin LI Handle status 126/127 as per POSIX. 15318fd37a7SXin LI (edit): Likewise. 15418fd37a7SXin LI (main): Likewise. Fix getopt typo: -E wasn't supported. 15518fd37a7SXin LI 15618fd37a7SXin LI * src/system.h (S_IRWXU, S_IRWXG, S_IRWXO): Define if not defined. 15718fd37a7SXin LI (S_IXUSR, S_IXGRP, S_IXOTH): Remove. 15818fd37a7SXin LI Include <time.h> unconditionally, since we can assume C89 now. 15918fd37a7SXin LI Likewise for <stdlib.h>, <string.h>. 16018fd37a7SXin LI (getenv, EXIT_SUCCESS, EXIT_FAILURE, SSIZE_MAX, strchr, strrchr, 16118fd37a7SXin LI memcmp, memcpy): Remove decl; no longer needed. 16218fd37a7SXin LI (strcasecoll, strcasecmp): Define if not built in. 16318fd37a7SXin LI (CTYPE_DOMAIN, ISPRINT, ISSPACE, TOLOWER, _tolower, errno): Remove; 16418fd37a7SXin LI we now assume C89 or better. All uses changed. 16518fd37a7SXin LI Include <stdbool.h> unconditionally now, since gnulib supports it 16618fd37a7SXin LI if the C compiler doesn't. All boolean uses of 0 and 1 now 16718fd37a7SXin LI changed to false and true. 16818fd37a7SXin LI (lin_is_printable_as_long_int): Renamed from lin_is_printable_as_long. 16918fd37a7SXin LI 17018fd37a7SXin LI * src/util.c (begin_output): Fix bug: 0 wasn't cast to char * arg, 17118fd37a7SXin LI which led to undefined behavior on 64-bit hosts. 17218fd37a7SXin LI Use more-standard test for exit status 126 versus 127. 17318fd37a7SXin LI (finish_output): Likewise. 17418fd37a7SXin LI (analyze_hunk): Do not cast bool to int. 17518fd37a7SXin LI 17618fd37a7SXin LI2004-03-15 Paul Eggert <eggert@twinsun.com> 17718fd37a7SXin LI 17818fd37a7SXin LI * src/cmp.c (main): Don't consider two files with the same name to 17918fd37a7SXin LI be the same, if their initial skip values differ. This fixes a 18018fd37a7SXin LI bug reported by Hideki Iwamoto in 18118fd37a7SXin LI <http://mail.gnu.org/archive/html/bug-gnu-utils/2004-03/msg00024.html>. 18218fd37a7SXin LI 18318fd37a7SXin LI2004-03-11 Paul Eggert <eggert@twinsun.com> 18418fd37a7SXin LI 18518fd37a7SXin LI * src/analyze.c (diag): Return void, not lin, since the return 18618fd37a7SXin LI value wasn't needed. All callers changed. 18718fd37a7SXin LI (diag, diff_2_files): 18818fd37a7SXin LI Use 'true' and 'false' instead of '1' and '0', when appropriate. 18918fd37a7SXin LI (compareseq): Use lin const * local variables instead of lin *. 19018fd37a7SXin LI Don't bother checking diag's return value. 19118fd37a7SXin LI (shift_boundaries, build_reverse_script, build_script, diff_2_files): 19218fd37a7SXin LI Use char arrays, not bool arrays, since 19318fd37a7SXin LI sizeof (bool) might be greater than 1. 19418fd37a7SXin LI 19518fd37a7SXin LI2004-02-09 Paul Eggert <eggert@twinsun.com> 19618fd37a7SXin LI 19718fd37a7SXin LI * m4/setmode.m4 (AC_FUNC_SETMODE_DOS): AC_LIBOBJ(setmode) if 19818fd37a7SXin LI we would return true. 19918fd37a7SXin LI 20018fd37a7SXin LI2002-10-14 Paul Eggert <eggert@twinsun.com> 20118fd37a7SXin LI 20218fd37a7SXin LI * src/Makefile.am (diff3.$(OBJEXT), diff.$(OBJEXT), 20318fd37a7SXin LI sdiff.$(OBJEXT)): Rename from (misspelled) diff3.$(OBJECT), 20418fd37a7SXin LI diff.$(OBJECT), sdiff.$(OBJECT). Patch by Paul D. Smith in 20518fd37a7SXin LI <http://mail.gnu.org/pipermail/bug-gnu-utils/2002-October/003251.html>. 20618fd37a7SXin LI Bug reported by Chris Bainbridge. 20718fd37a7SXin LI 20818fd37a7SXin LI2002-10-13 Paul Eggert <eggert@twinsun.com> 20918fd37a7SXin LI 21018fd37a7SXin LI * src/Makefile.am (MOSTLYCLEANFILES): Add paths.ht. 21118fd37a7SXin LI (paths.h): Send output to paths.ht first, and then rename to 21218fd37a7SXin LI paths.h at the end. This avoids problems if the disk is full. 21318fd37a7SXin LI It also works around what appears to be a bug with GNU make -j 21418fd37a7SXin LI (3.79.1); see <http://bugs.gentoo.org/show_bug.cgi?id=8934>. 21518fd37a7SXin LI 21618fd37a7SXin LI2002-06-27 Paul Eggert <eggert@twinsun.com> 21718fd37a7SXin LI 21818fd37a7SXin LI * NEWS, configure.ac (AC_INIT): Version 2.8.4. 21918fd37a7SXin LI 22018fd37a7SXin LI * config/config.sub: Sync with latest version maintained in other 22118fd37a7SXin LI packages. 22218fd37a7SXin LI 22318fd37a7SXin LI * lib/file-type.h: Protect against double inclusion. Detect 22418fd37a7SXin LI whether <sys/stat.h> has been included. Fix from Jim Meyering. 22518fd37a7SXin LI 22618fd37a7SXin LI * src/analyze.c (briefly_report): Don't say "Binary files differ", 22718fd37a7SXin LI since one of the files may not be a binary file. 22818fd37a7SXin LI Bug reported by Dan Jacobson. 22918fd37a7SXin LI 23018fd37a7SXin LI2002-06-22 Paul Eggert <eggert@twinsun.com> 23118fd37a7SXin LI 23218fd37a7SXin LI * lib/c-stack.c (segv_handler, c_stack_action) [! defined 23318fd37a7SXin LI SA_SIGINFO]: Do not assume SA_SIGINFO behavior. 23418fd37a7SXin LI Bug reported by Jim Meyering on NetBSD 1.5.2. 23518fd37a7SXin LI 23618fd37a7SXin LI2002-06-16 Paul Eggert <eggert@twinsun.com> 23718fd37a7SXin LI 23818fd37a7SXin LI * NEWS, configure.ac (AC_INIT): Version 2.8.3. 23918fd37a7SXin LI 24018fd37a7SXin LI * config/depcomp, config/missing, README: Update to automake 1.6.2. 24118fd37a7SXin LI 24218fd37a7SXin LI * po/LINGUAS: Add en_US. 24318fd37a7SXin LI * po/en_US.po: New file. 24418fd37a7SXin LI * po/POTFILES.in: Remove lib/freesoft.c. 24518fd37a7SXin LI Add lib/file-type.c, lib/version-etc.c, lib/xmalloc.c. 24618fd37a7SXin LI 24718fd37a7SXin LI2002-06-15 Paul Eggert <eggert@twinsun.com> 24818fd37a7SXin LI 24918fd37a7SXin LI * doc/diff.texi (Special Files): Document behavior of symlink 25018fd37a7SXin LI loops. 25118fd37a7SXin LI 25218fd37a7SXin LI * lib/Makefile.am (noinst_HEADERS): Remove freesoft.h. 25318fd37a7SXin LI Add version-etc.h. 25418fd37a7SXin LI (libdiffutils_a_SOURCES): Remove freesoft.c. Add version-etc.c. 25518fd37a7SXin LI * lib/freesoft.c, lib/freesoft.h: Remove. 25618fd37a7SXin LI * lib/version-etc.h (PARAMS): Remove; we now assume C89 at least. 25718fd37a7SXin LI 25818fd37a7SXin LI * lib/version-etc.h (version_etc): Remove package and version args. 25918fd37a7SXin LI (version_etc_copyright): Remove. 26018fd37a7SXin LI * lib/version-etc.c: Likewise. 26118fd37a7SXin LI Do not include unlocked-io.h; no longer needed. 26218fd37a7SXin LI Include gettext.h rather than libinto.h. 26318fd37a7SXin LI (_): Define unconditionally. 26418fd37a7SXin LI (version_etc): Adjust wording to match current GNU coding standards. 26518fd37a7SXin LI Translate "(C)" if possible. 26618fd37a7SXin LI 26718fd37a7SXin LI * lib/version-etc.c, lib/version-etc.h: New files, taken from 26818fd37a7SXin LI fileutils. 26918fd37a7SXin LI 27018fd37a7SXin LI * src/Makefile.am (cmp_SOURCES, diff3_SOURCES, sdiff_SOURCES, 27118fd37a7SXin LI diff_SOURCES): Remove version.c. 27218fd37a7SXin LI (MAINTAINERCLEANFILES, $(srcdir)/version.c): Remove. 27318fd37a7SXin LI 27418fd37a7SXin LI * src/cmp.c: Include version-etc.h, not freesoft.h. 27518fd37a7SXin LI (copyright_notice): Remove. 27618fd37a7SXin LI (main): Use version_etc to print version. 27718fd37a7SXin LI * src/diff.c, src/diff3.c, src/sdiff.c: Likewise. 27818fd37a7SXin LI 27918fd37a7SXin LI * src/cmp.c (version_string): Remove decl. 28018fd37a7SXin LI * src/diff.h, src/diff3.c, src/sdiff.c: Likewise. 28118fd37a7SXin LI 28218fd37a7SXin LI2002-06-11 Paul Eggert <eggert@twinsun.com> 28318fd37a7SXin LI 28418fd37a7SXin LI * lib/fnmatch.c, lib/fnmatch_loop.c (WIDE_CHAR_SUPPORT): 28518fd37a7SXin LI New macro. Use it uniformly instead of 28618fd37a7SXin LI (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H). 28718fd37a7SXin LI It also uses HAVE_BTOWC, to fix a porting bug on Solaris 2.5.1 28818fd37a7SXin LI reported by Vin Shelton. 28918fd37a7SXin LI * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for btowc. 29018fd37a7SXin LI 29118fd37a7SXin LI * NEWS, configure.ac (AC_INIT): Version 2.8.2. 29218fd37a7SXin LI 29318fd37a7SXin LI * ABOUT-NLS, config/config.guess, config/config.sub, 29418fd37a7SXin LI config/depcomp, config/texinfo.tex, lib/posix/regex.h, 29518fd37a7SXin LI m4/c-bs-a.m4, m4/gettext.m4, m4/gnu-source.m4, m4/lib-link.m4, 29618fd37a7SXin LI m4/malloc.m4: 29718fd37a7SXin LI Update to recent version (maintained in other packages). 29818fd37a7SXin LI * m4/prereq.m4 (jm_PREREQ_EXCLUSIVE): AC_FUNC_FNMATCH_GNU 29918fd37a7SXin LI no longer takes a lib. 30018fd37a7SXin LI 30118fd37a7SXin LI * README: Incorporate contents from INSTALLME. 30218fd37a7SXin LI * INSTALLME: Remove. 30318fd37a7SXin LI * Makefile.am (EXTRA_DIST): Remove INSTALLME. 30418fd37a7SXin LI 30518fd37a7SXin LI * configure.ac (AC_GNU_SOURCE): Move up, so that it affects 30618fd37a7SXin LI later compilations properly. 30718fd37a7SXin LI (DEFAULT_DIFF_PROGRAM, AC_TYPE_SIGNAL): Remove. 30818fd37a7SXin LI (jm_AC_TYPE_INTMAX_T): Add. 30918fd37a7SXin LI (AC_FUNC_FNMATCH_GNU): Use this, instead of AC_FUNC_FNMATCH. 31018fd37a7SXin LI (AC_CONFIG_LINKS): regex.hin renamed from regex_.h. 31118fd37a7SXin LI 31218fd37a7SXin LI * doc/diff.texi: Reword "@option{-f} and @option{--foo}" to 31318fd37a7SXin LI "@option{-f} or @option{--foo}". 31418fd37a7SXin LI Use @acronym instead of @sc where appropriate. 31518fd37a7SXin LI (Specified Lines): Renamed from Specified Folding. 31618fd37a7SXin LI (Comparison, Blank Lines): 31718fd37a7SXin LI Clarify wordings for Blank Lines and Specified Lines nodes. 31818fd37a7SXin LI (Binary): Mention --verbose and --print-bytes. 31918fd37a7SXin LI (Tabs, sdiff Option Summary, diff Options): 32018fd37a7SXin LI New option --tabsize=COLUMNS. 32118fd37a7SXin LI 32218fd37a7SXin LI * lib/Makefile.am (EXTRA_DIST): Add fnmatch_loop.c. 32318fd37a7SXin LI (noinst_HEADERS): fnmatch_.h renamed from fnmatch.hin. 32418fd37a7SXin LI regex_.h renamed from regex.hin. 32518fd37a7SXin LI Add file-type.h. 32618fd37a7SXin LI (libdiffutils_a_SOURCES): Add file-type.c. 32718fd37a7SXin LI (DISTCLEANFILES): Remove fnmatch.hno, regex.hno. 32818fd37a7SXin LI 32918fd37a7SXin LI * lib/c-stack.c (__attribute__): New macro. 33018fd37a7SXin LI (EOVERFLOW): Define if not defined. 33118fd37a7SXin LI (stack_t): Define to struct sigaltstack if not defined or declared. 33218fd37a7SXin LI Include <sys/resource.h>, <ucontext.h> if available. 33318fd37a7SXin LI Include <stdio.h> if DEBUG. 33418fd37a7SXin LI Do not include <inttypes.h> or <stdint.h>. 33518fd37a7SXin LI (c_stack_die): Remove info and context args. All uses changed. 33618fd37a7SXin LI (segv_action): Likewise. 33718fd37a7SXin LI (alternate_signal_stack): Change uintmax_t to long, to ease porting. 33818fd37a7SXin LI (get_stack_location, min_address_from_argv, max_address_from_argv, 33918fd37a7SXin LI null_action): New functions. 34018fd37a7SXin LI (stack_base, stack_size): New vars. 34118fd37a7SXin LI (segv_handler): context arg may not be used. 34218fd37a7SXin LI Use global stack_base, stack_size if 34318fd37a7SXin LI ! HAVE_XSI_STACK_OVERFLOW_HEURISTIC. 34418fd37a7SXin LI Add debug code. 34518fd37a7SXin LI Invoke die (rather than segv_action) to exit. 34618fd37a7SXin LI (c_stack_action): Accept new argv arg, and simpler handler arg. 34718fd37a7SXin LI All uses changed. Move code into new functions above. 34818fd37a7SXin LI Allow null action. 34918fd37a7SXin LI [! (defined SA_ONSTACK && defined _SC_PAGESIZE)]: Assume all segvs 35018fd37a7SXin LI are stack overflows. 35118fd37a7SXin LI (main) [DEBUG]: Describe what output should be like. 35218fd37a7SXin LI 35318fd37a7SXin LI * lib/c-stack.h (siginfo_t, c_stack_die): Remove decl. 35418fd37a7SXin LI 35518fd37a7SXin LI * lib/file-type.c, lib/file-type.h: New files. These contain code 35618fd37a7SXin LI that was in src/diff.c, but is now librarified and spiffed up a 35718fd37a7SXin LI bit. Jim Meyering suggested this. 35818fd37a7SXin LI 35918fd37a7SXin LI * lib/fnmatch.c (alloca, __builtin_expect): Define for non-GCC hosts. 36018fd37a7SXin LI <strings.h>: Include only if HAVE_STRINGS_H. 36118fd37a7SXin LI <stddef.h>: Include if we include stdlib.h. 36218fd37a7SXin LI Do not comment out all code if ! HAVE_FNMATCH_GNU. 36318fd37a7SXin LI (getenv): Do not declare if HAVE_DECL_GETENV. 36418fd37a7SXin LI (__strchrnul, __wcschrnul): Remove; not used. 36518fd37a7SXin LI (MEMPCPY): Use mempcpy if not _LIBC; use memcpy if neither _LIBC 36618fd37a7SXin LI nor HAVE_MEMPCPY. 36718fd37a7SXin LI (FOLD) [HANDLE_MULTIBYTE]: Do not pass wide char to ISUPPER. 36818fd37a7SXin LI (STRLEN, STRCAT, MEMPCPY) [HANDLE_MULTIBYTE && !defined _LIBC]: 36918fd37a7SXin LI Use wcslen rather than __wcslen, and likewise for wcscat, wmempcpy. 37018fd37a7SXin LI (MEMPCPY) [HANDLE_MULTIBYTE]: Use wmempcpy if not _LIBC; use wmemcpy 37118fd37a7SXin LI if neither _LIBC nor HAVE_WMEMPCPY. 37218fd37a7SXin LI * lib/fnmatch_.h (__const): Do not define to empty, as this breaks 37318fd37a7SXin LI Sun cc. The code doesn't work with K&R anyway. 37418fd37a7SXin LI * lib/fnmatch_loop.c (struct patternlist.str): Size 1, not 0, 37518fd37a7SXin LI as C89 requires this. 37618fd37a7SXin LI (NEW_PATTERN): Use offsetof, not sizeof, since str now has size 1. 37718fd37a7SXin LI * lib/fnmatch_.h: Import from glibc fnmatch.h. 37818fd37a7SXin LI * lib/fnmatch.c, lib/fnmatch_loop.c: Import from glibc. 37918fd37a7SXin LI 38018fd37a7SXin LI * lib/posixver.c: Include posixver.h. 38118fd37a7SXin LI 38218fd37a7SXin LI * lib/regex_.h: Renamed from lib/regex.hin. 38318fd37a7SXin LI 38418fd37a7SXin LI * m4/c-stack.m4 (jm_PREREQ_C_STACK): Do not AC_REQUIRE 38518fd37a7SXin LI jm_AC_TYPE_UINTMAX_T and do not use uintmax_t. 38618fd37a7SXin LI Check for sys/resource.h, uccontext.h. 38718fd37a7SXin LI Check for decls and existence of getcontext, sigaltstack. 38818fd37a7SXin LI Check for stack_t. 38918fd37a7SXin LI 39018fd37a7SXin LI * m4/codeset.m4, m4/glibc21.m4, m4/lcmessage.m4: Remove. 39118fd37a7SXin LI 39218fd37a7SXin LI * m4/fnmatch.m4: Update to latest Autoconf CVS for AC_FUNC_FNMATCH_GNU. 39318fd37a7SXin LI * m4/gnu-source.m4: Likewise, for AC_GNU_SOURCE (renamed from 39418fd37a7SXin LI AC__GNU_SOURCE). 39518fd37a7SXin LI 39618fd37a7SXin LI * m4/mbstate_t.m4 (AC_TYPE_MBSTATE_T): Renamed from AC_MBSTATE_T. 39718fd37a7SXin LI All uses changed. Upgrade to recent Autoconf CVS. 39818fd37a7SXin LI 39918fd37a7SXin LI * m4/stdbool.m4 (AC_HEADER_STDBOOL): Do not cast pointer to 40018fd37a7SXin LI bool in integer constant expression; C99 does not allow it. 40118fd37a7SXin LI Reported by Bruno Haible. 40218fd37a7SXin LI 40318fd37a7SXin LI * po/LINGUAS: Add hu, pt_BR. 40418fd37a7SXin LI * po/hu.po, po/pt_BR.po: New files. 40518fd37a7SXin LI 40618fd37a7SXin LI * src/Makefile.am (noinst_HEADERS): Remove diff.h. 40718fd37a7SXin LI (DEFS): Remove. 40818fd37a7SXin LI (diff_sources): Add diff.h. 40918fd37a7SXin LI (MOSTLYCLEANFILES): New macro. 41018fd37a7SXin LI (cmp.$(OBJEXT) diff3.$(OBJECT) diff.$(OBJECT) sdiff.$(OBJECT)): Depend 41118fd37a7SXin LI on paths.h. 41218fd37a7SXin LI (paths.h): New rule. 41318fd37a7SXin LI 41418fd37a7SXin LI * src/analyze.c, src/cmp.c, src/diff.c, src/diff3.c, src/io.c, 41518fd37a7SXin LI src/sdiff.c: Include <file-type.h>. 41618fd37a7SXin LI 41718fd37a7SXin LI * src/cmp.c: Include paths.h. 41818fd37a7SXin LI (copyright_notice): Renamed from copyright_string. 41918fd37a7SXin LI Now a msgid, so that copyright symbol can be translated. 42018fd37a7SXin LI All uses changed. 42118fd37a7SXin LI * src/diff.c, src/diff3.c, src/sdiff.c: Likewise. 42218fd37a7SXin LI 42318fd37a7SXin LI * src/diff.c: Include posixver.h. 42418fd37a7SXin LI (TABSIZE_OPTION): New constant. 42518fd37a7SXin LI (main): Allow widths up to SIZE_MAX. 42618fd37a7SXin LI (filetype): Move to lib/file-type.c and rename to file_type. 42718fd37a7SXin LI All uses changed. 42818fd37a7SXin LI 42918fd37a7SXin LI * src/diff.c (longopts, main, usage): New option --tabsize=COLUMNS. 43018fd37a7SXin LI * src/io.c (find_and_hash_each_line): Likewise. 43118fd37a7SXin LI 43218fd37a7SXin LI * src/diff.h (TAB_WIDTH): Remove. 43318fd37a7SXin LI (tabsize): New decl. 43418fd37a7SXin LI (sdiff_half_width, sdiff_column2_offset): Now size_t rather than 43518fd37a7SXin LI unsigned int. 43618fd37a7SXin LI 43718fd37a7SXin LI * src/diff3.c (skipwhite, readnum): New functions. 43818fd37a7SXin LI (process_diff_control): Use them. 43918fd37a7SXin LI (SKIPWHITE, READNUM): Remove. 44018fd37a7SXin LI (read_diff): Don't worry about errno == ENOEXEC. 44118fd37a7SXin LI 44218fd37a7SXin LI * src/sdiff.c (catchsig, signal_handler, initial_action): Signal 44318fd37a7SXin LI handlers return void, not RETSIGTYPE, since we no longer support 44418fd37a7SXin LI K&R. 44518fd37a7SXin LI (TABSIZE_OPTION): New constant. 44618fd37a7SXin LI (longopts, usage, main): New option --tabsize=COLUMNS. 44718fd37a7SXin LI (cleanup): New arg signo. All uses changed. 44818fd37a7SXin LI (ck_editor_status, main, edit): Don't worry about ENOEXEC. 44918fd37a7SXin LI 45018fd37a7SXin LI * src/side.c (tab_from_to, print_half_line, print_1sdiff_line): 45118fd37a7SXin LI New option --tabsize=COLUMNS. 45218fd37a7SXin LI 45318fd37a7SXin LI * src/system.h (S_ISBLK, S_ISCHR, S_ISDIR, S_ISFIFO, S_ISREG, 45418fd37a7SXin LI S_ISSOCK): Remove; now in lib/file-type.h. 45518fd37a7SXin LI 45618fd37a7SXin LI * src/util.c (finish_output): Check for ENOEXEC. 45718fd37a7SXin LI (lines_differ, output_1_line): New option --tabsize=COLUMNS. 45818fd37a7SXin LI (analyze_hunk): If -b or -w is also specified, -B now considers 45918fd37a7SXin LI lines to be empty if they contain only white space. 46018fd37a7SXin LI 46118fd37a7SXin LI2002-04-05 Paul Eggert <eggert@sic.twinsun.com> 46218fd37a7SXin LI 46318fd37a7SXin LI * NEWS, configure.ac (AC_INIT): Version 2.8.1. 46418fd37a7SXin LI 46518fd37a7SXin LI * configure.ac (AC_HEADER_STDBOOL): Add. 46618fd37a7SXin LI (AC_CHECK_HEADERS): Remove stdbool.h. 46718fd37a7SXin LI * m4/stdbool.m4: New file. 46818fd37a7SXin LI * m4/prereq.m4 (jm_PREREQ_EXCLUDE): 46918fd37a7SXin LI Use AC_HEADER_STDBOOL rather than AC_CHECK_HEADERS(stdbool.h). 47018fd37a7SXin LI (jm_PREREQ_HASH): Likewise. 47118fd37a7SXin LI 47218fd37a7SXin LI * src/system.h (SSIZE_MAX): Define if limits.h doesn't. 47318fd37a7SXin LI 47418fd37a7SXin LI * src/analyze.c (diff_2_files): Assign PTRDIFF_MAX - 1 to a 47518fd37a7SXin LI size_t variable, just in case there's a problem with ptrdiff_t 47618fd37a7SXin LI versus size_t. 47718fd37a7SXin LI 47818fd37a7SXin LI * lib/cmpbuf.c (errno): Remove decl; K&R C is no longer supported. 47918fd37a7SXin LI Include limits.h. 48018fd37a7SXin LI (SIZE_MAX, SSIZE_MAX): Define if standard headers don't. 48118fd37a7SXin LI (MIN): New macro. 48218fd37a7SXin LI (block_read): Do not attempt to read more than SSIZE_MAX bytes, as the 48318fd37a7SXin LI resulting behavior is implementation-defined. Work around bug in 48418fd37a7SXin LI Tru64 5.1, which can't read more than INT_MAX bytes at a time. 48518fd37a7SXin LI * src/cmp.c (cmp): Use block_read instead of read, to work 48618fd37a7SXin LI around Tru64 5.1 bug. 48718fd37a7SXin LI * src/diff3.c (read_diff): Likewise. 48818fd37a7SXin LI * src/diff3.c: Include cmpbuf.h. 48918fd37a7SXin LI 49018fd37a7SXin LI * THANKS: Add Ulrich Drepper. 49118fd37a7SXin LI 49218fd37a7SXin LI * INSTALLME: Mention GNU texinfo. 49318fd37a7SXin LI 49418fd37a7SXin LI * doc/diff.texi: 49518fd37a7SXin LI Use new @copying directive. 49618fd37a7SXin LI Put @contents first, not last, since Texinfo now suggests this. 49718fd37a7SXin LI Fix bug in -w documentation noted by Karl Berry. 49818fd37a7SXin LI Mention links for speedup. 49918fd37a7SXin LI New node "Speedups" for future speedups. 50018fd37a7SXin LI Just say "Index", not "Concept Index". 50118fd37a7SXin LI 50218fd37a7SXin LI2002-03-26 Paul Eggert <eggert@twinsun.com> 50318fd37a7SXin LI 50418fd37a7SXin LI * src/Makefile.am: 50518fd37a7SXin LI (INCLUDES): Remove this obsolete macro, replacing it with: 50618fd37a7SXin LI (AM_CPPFLAGS): New macro. 50718fd37a7SXin LI 50818fd37a7SXin LI2002-03-26 Albert Chin-A-Young <china@thewrittenword.com> 50918fd37a7SXin LI 51018fd37a7SXin LI * src/Makefile.am (datadir): Remove, as it conflicts with --datadir. 51118fd37a7SXin LI 51218fd37a7SXin LI2002-03-26 Paul Eggert <eggert@twinsun.com> 51318fd37a7SXin LI 51418fd37a7SXin LI * doc/diff.texi (dircategory GNU packages): Fix typo: a "* " was 51518fd37a7SXin LI missing before the menu entry. Bug diagnosed by Adam Heath. 51618fd37a7SXin LI Also, put this dircategory after the Individual utilities dircategory, 51718fd37a7SXin LI to work around a compatibility problem with Debian install-info. 51818fd37a7SXin LI 51918fd37a7SXin LI2002-03-24 Eli Zaretskii <eliz@is.elta.co.il> 52018fd37a7SXin LI 52118fd37a7SXin LI * src/io.c (sip): Do not mishandle buffered count when reverting 52218fd37a7SXin LI to text mode. 52318fd37a7SXin LI 52418fd37a7SXin LI2002-03-23 Paul Eggert <eggert@twinsun.com> 52518fd37a7SXin LI 52618fd37a7SXin LI * NEWS, configure.ac (AC_INIT): Version 2.8. 52718fd37a7SXin LI * configure.ac (AC_PREREQ): 2.53. 52818fd37a7SXin LI * INSTALLME: Upgrade to gettext 0.11.1 and help2man 1.27. 52918fd37a7SXin LI 53018fd37a7SXin LI * doc/diff.texi: Upgrade the description of `patch' to GNU patch 53118fd37a7SXin LI 2.5.4, and revamp the documentation accordingly. 53218fd37a7SXin LI 53318fd37a7SXin LI * src/diff.c (main): Fix typo that prevented diff -y from working. 53418fd37a7SXin LI Bug reported by Mitsuru Chinen. 53518fd37a7SXin LI 53618fd37a7SXin LI2002-03-15 Paul Eggert <eggert@twinsun.com> 53718fd37a7SXin LI 53818fd37a7SXin LI * lib/c-stack.c (c_stack_die) [!HAVE_SIGINFO_T]: Don't use info. 53918fd37a7SXin LI Bug reported by Eli Zaretskii. 54018fd37a7SXin LI 54118fd37a7SXin LI2002-03-15 Eli Zaretskii <eliz@is.elta.co.il> 54218fd37a7SXin LI 54318fd37a7SXin LI * ms/config.sed: Tweak editing of install-info-am target. 54418fd37a7SXin LI 54518fd37a7SXin LI2002-03-12 Paul Eggert <eggert@twinsun.com> 54618fd37a7SXin LI 54718fd37a7SXin LI * NEWS, configure.ac (AC_INIT): Version 2.7.10. 54818fd37a7SXin LI 54918fd37a7SXin LI * NEWS: cmp -l -s and cmp -s -l are not allowed. 55018fd37a7SXin LI Deprecate diff -h, -H, -L, -P, --inhibit-hunk-merge. 55118fd37a7SXin LI 55218fd37a7SXin LI * configure.ac (jm_PREREQ_HARD_LOCALE): Add. 55318fd37a7SXin LI (AM_INIT_AUTOMAKE): Do not distribute shar file. 55418fd37a7SXin LI 55518fd37a7SXin LI * doc/diff.texi (Overview): byte != character. 55618fd37a7SXin LI (Detailed Context, Detailed Unified, Alternate Names, diff Options): 55718fd37a7SXin LI Do not document diff -L. 55818fd37a7SXin LI (Comparing Directories, Making Patches, diff Options): 55918fd37a7SXin LI Do not document diff -P. 56018fd37a7SXin LI (diff Performance, sdiff Option Summary, diff Options, sdiff Options): 56118fd37a7SXin LI Do not document diff -H. 56218fd37a7SXin LI (diff Performance, diff Options): Do not document --horizon-lines. 56318fd37a7SXin LI (cmp Options): Prefer -b to -c. 56418fd37a7SXin LI (cmp Options, diff Options, diff3 Options, patch Options, 56518fd37a7SXin LI sdiff Options): Put short options next to the similar long options. 56618fd37a7SXin LI Document --help, and use the same wording for --verbose. 56718fd37a7SXin LI (diff3 Options): Fix typo in description of -E, which used wrongly used 56818fd37a7SXin LI "-e" instead of "-E". 56918fd37a7SXin LI 57018fd37a7SXin LI * lib/hard-locale.c (alloca): Remove. 57118fd37a7SXin LI Include stdlib.h if available, for malloc. 57218fd37a7SXin LI (hard_locale): Use malloc, not alloca, so that we need not worry about 57318fd37a7SXin LI alloca issues. Test for storage allocation failure. 57418fd37a7SXin LI 57518fd37a7SXin LI * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_HARD_LOCALE. 57618fd37a7SXin LI (jm_PREREQ_HARD_LOCALE): New macro. 57718fd37a7SXin LI 57818fd37a7SXin LI * src/cmp.c (specify_comparison_type): New function. 57918fd37a7SXin LI (check_stdout): "indices and codes" -> "byte numbers and values" 58018fd37a7SXin LI (main): Detect clashing options. 58118fd37a7SXin LI (cmp): Use "byte" rather than "char" if a translation for "byte" 58218fd37a7SXin LI is available, even when in the POSIX locale. 58318fd37a7SXin LI 58418fd37a7SXin LI * src/diff.c (option_help_msgid): Do not document -L, -P, 58518fd37a7SXin LI --horizon-lines, --inhibit-hunk-merge, -H. 58618fd37a7SXin LI * src/diff.h: -L -> --label 58718fd37a7SXin LI 58818fd37a7SXin LI2002-03-11 Paul Eggert <eggert@twinsun.com> 58918fd37a7SXin LI 59018fd37a7SXin LI * NEWS, configure.ac (AC_INIT): Version 2.7.9. 59118fd37a7SXin LI 59218fd37a7SXin LI * INSTALLME: Update to autoconf 2.53, automake 1.6, help2man 59318fd37a7SXin LI 1.25 with patch. 59418fd37a7SXin LI 59518fd37a7SXin LI * configure.ac (AC_INIT): 59618fd37a7SXin LI Change package name from diff to diffutils. 59718fd37a7SXin LI (AM_INIT_AUTOMAKE): Use new form, with option gnits, 59818fd37a7SXin LI rather than old from that duplicated AC_INIT. 59918fd37a7SXin LI (AM_MISSING_PROG): Add help2man. 60018fd37a7SXin LI (REGEX_MALLOC): Define. 60118fd37a7SXin LI (AC_CONFIG_FILES): Add man/Makefile. 60218fd37a7SXin LI 60318fd37a7SXin LI * Makefile.am (AUTOMAKE_OPTIONS): Remove. 60418fd37a7SXin LI * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove. 60518fd37a7SXin LI * lib/Makefile.am (AUTOMAKE_OPTIONS): Likewise. 60618fd37a7SXin LI * ms/Makefile.am (AUTOMAKE_OPTIONS): Likewise. 60718fd37a7SXin LI * src/Makefile.am (AUTOMAKE_OPTIONS): Likewise. 60818fd37a7SXin LI 60918fd37a7SXin LI * lib/c-stack.c: Include <errno.h> 61018fd37a7SXin LI (ENOTSUP): Define if errno.h doesn't. 61118fd37a7SXin LI (SA_NODEFER, SA_ONSTACK, SA_RESETHAND, SA_SIGINFO, SIGSTKSZ, 61218fd37a7SXin LI _SC_PAGESIZE, ALTERNATE_STACK_SIZE, stack_t, sigaltstack): 61318fd37a7SXin LI Remove; we now assume them all when 61418fd37a7SXin LI HAVE_XSI_STACK_OVERFLOW_HEURISTIC, so we don't need 61518fd37a7SXin LI substitutes. 61618fd37a7SXin LI (<ucontext.h>): Include only if HAVE_XSI_STACK_OVERFLOW_HEURISTIC. 61718fd37a7SXin LI (alternate_signal_stack): Now of size SIGSTKSZ. 61818fd37a7SXin LI (segv_handler): Simplify, under the assumption that 61918fd37a7SXin LI HAVE_XSI_STACK_OVERFLOW_HEURISTIC is nonzero. 62018fd37a7SXin LI (c_stack_action): Likewise. 62118fd37a7SXin LI (exit_failure) [DEBUG]: Initialize to 0, not 1. 62218fd37a7SXin LI (recurse, main) [DEBUG]: Remove main args. 62318fd37a7SXin LI 62418fd37a7SXin LI * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Change 62518fd37a7SXin LI wording of message. Do not check for stdbool.h or ucontext.h, 62618fd37a7SXin LI or for ucontext_t or sigaction or sigaltstack. 62718fd37a7SXin LI 62818fd37a7SXin LI * po/LINGUAS: Add zh_TW. 62918fd37a7SXin LI 63018fd37a7SXin LI * Makefile.am (SUBDIRS): Add man. 63118fd37a7SXin LI * man/Makefile.am: New file. 63218fd37a7SXin LI * src/cmp.c (usage): Reword for help2man. 63318fd37a7SXin LI * src/diff.c (option_help_msgid): Likewise. 63418fd37a7SXin LI * src/diff3.c (option_help_msgid, usage): Likewise. 63518fd37a7SXin LI * src/sdiff3.c (option_help_msgid, usage): Likewise. 63618fd37a7SXin LI Reword for help2man. 63718fd37a7SXin LI 63818fd37a7SXin LI * THANKS: Add email address for Tower. 63918fd37a7SXin LI 64018fd37a7SXin LI * config/config.guess, config/config.sub, config/depcomp, 64118fd37a7SXin LI config/install-sh, config/mdate-sh, config/missing, 64218fd37a7SXin LI config/mkinstalldirs, config/texinfo.tex: Update 64318fd37a7SXin LI to recent version (maintained in other packages). 64418fd37a7SXin LI 64518fd37a7SXin LI2002-03-04 Bruno Haible <haible@ilog.fr> 64618fd37a7SXin LI 64718fd37a7SXin LI * m4/gettext.m4 (AM_GNU_GETTEXT): Set LIBINTL and LTLIBINTL to empty if 64818fd37a7SXin LI no preinstalled GNU gettext was found. 64918fd37a7SXin LI 65018fd37a7SXin LI2002-03-02 Eli Zaretskii <eliz@is.elta.co.il> 65118fd37a7SXin LI 65218fd37a7SXin LI * ms/config.sed: Tweak editing of install-info-am and 65318fd37a7SXin LI uninstall-info-am targets, to include 8+3-butchered names of Info 65418fd37a7SXin LI files. 65518fd37a7SXin LI 65618fd37a7SXin LI2002-02-28 Paul Eggert <eggert@twinsun.com> 65718fd37a7SXin LI 65818fd37a7SXin LI * NEWS, configure.ac (AC_INIT, AM_INIT_AUTOMAKE): Version 2.7.8. 65918fd37a7SXin LI 66018fd37a7SXin LI * doc/diff.texi: Add vr index. 66118fd37a7SXin LI Update copyright to 2002. 66218fd37a7SXin LI (Standards conformance): New chapter. 66318fd37a7SXin LI (Binary): Differing binary files are trouble unless the user asked for 66418fd37a7SXin LI brief output. 66518fd37a7SXin LI (Detailed Context): Prefer ISO time stamp format in discussion. 66618fd37a7SXin LI (Detailed Unified, Pagination): Likewise. 66718fd37a7SXin LI (Less Context): Likewise. Also use short option. 66818fd37a7SXin LI (Alternate Names): Separate option from arg. 66918fd37a7SXin LI (Making Patches): Mention -U 2. 67018fd37a7SXin LI (diff Options): Deprecate -LINES, as POSIX 1003.1-2001 does not 67118fd37a7SXin LI allow it. 67218fd37a7SXin LI 67318fd37a7SXin LI * INSTALLME: Update advice for Solaris installation problems. 67418fd37a7SXin LI We no longer use a test version of gettext. 67518fd37a7SXin LI Autoconf test version updated from 2.52f to 2.52h. 67618fd37a7SXin LI POSIX 1003.1-2001 patch for Automake. 67718fd37a7SXin LI 67818fd37a7SXin LI * configure.ac (AC__GNU_SOURCE): Add this, 67918fd37a7SXin LI replacing AH_VERBATIM of _GNU_SOURCE. 68018fd37a7SXin LI (tempname): Use AC_LIBOBJS, not LIBOBJS=, as now required by autoconf. 68118fd37a7SXin LI (jm_PREREQ_C_STACK): Add. 68218fd37a7SXin LI (AC_CONFIG_FILES): Remove intl/Makefile. 68318fd37a7SXin LI (AM_GNU_GETTEXT): Add external arg, from gettext 0.11. 68418fd37a7SXin LI 68518fd37a7SXin LI * lib/c-stack.c, lib/c-stack.h, lib/exitfail.c, lib/exitfail.h, 68618fd37a7SXin LI lib/posixver.c, lib/posixver.h, m4/c-stack.m4, m4/gnu-source.m4, 68718fd37a7SXin LI po/cs.po, po/ja.po: New files. 68818fd37a7SXin LI 68918fd37a7SXin LI * intl/ChangeLog, intl/Makefile.in, intl/VERSION, 69018fd37a7SXin LI intl/bindtextdom.c, intl/config.charset, intl/dcgettext.c, 69118fd37a7SXin LI intl/dcigettext.c, intl/dcngettext.c, intl/dgettext.c, 69218fd37a7SXin LI intl/dngettext.c, intl/explodename.c, intl/finddomain.c, 69318fd37a7SXin LI intl/gettext.c, intl/gettextP.h, intl/gmo.h, intl/hash-string.h, 69418fd37a7SXin LI intl/intl-compat.c, intl/l10nflist.c, intl/libgnuintl.h, 69518fd37a7SXin LI intl/loadinfo.h, intl/loadmsgcat.c, intl/localcharset.c, 69618fd37a7SXin LI intl/locale.alias, intl/localealias.c, intl/localename.c, 69718fd37a7SXin LI intl/ngettext.c, intl/os2compat.c, intl/os2compat.h, intl/osdep.c, 69818fd37a7SXin LI intl/plural-eval.c, intl/plural-exp.c, intl/plural-exp.h, 69918fd37a7SXin LI intl/plural.c, intl/plural.y, intl/ref-add.sin, intl/ref-del.sin, 70018fd37a7SXin LI intl/textdomain.c, m4/isc-posix.m4, m4/libtool.m4: Remove. 70118fd37a7SXin LI 70218fd37a7SXin LI * ABOUT-NLS: Update to Gettext 0.11. 70318fd37a7SXin LI 70418fd37a7SXin LI * Makefile.am (SUBDIRS): Remove intl. 70518fd37a7SXin LI 70618fd37a7SXin LI * config/config.guess, config/config.rpath, config/config.sub, 70718fd37a7SXin LI config/texinfo.tex, config/depcomp, config/texinfo.tex, 70818fd37a7SXin LI lib/tempname.c: Update to latest version from other packages. 70918fd37a7SXin LI 71018fd37a7SXin LI * lib/xalloc.h (xalloc_exit_failure): Remove; subsumed by exit_failure. 71118fd37a7SXin LI * lib/xmalloc.c: Include exitfail.h. 71218fd37a7SXin LI (xalloc_exit_failure): Remove; subsumed by exit_failure. 71318fd37a7SXin LI All uses changed. 71418fd37a7SXin LI 71518fd37a7SXin LI * lib/Makefile.am (noinst_HEADERS): Add c-stack.h, exitfail.h. 71618fd37a7SXin LI (libdiffutils_a_SOURCES): Add c-stack.c, exitfail.c, quotesys.c. 71718fd37a7SXin LI (INCLUDES): Remove. 71818fd37a7SXin LI 71918fd37a7SXin LI * lib/cmpbuf.h (buffer_lcm): New arg LCM_MAX. 72018fd37a7SXin LI * lib/cmpbuf.c: Include errno.h. 72118fd37a7SXin LI (errno): Declare if !STDC_HEADERS. 72218fd37a7SXin LI Include signal.h. 72318fd37a7SXin LI (SA_RESTART): Define if not already defined. 72418fd37a7SXin LI Include <inttypes.h>. 72518fd37a7SXin LI (PTRDIFF_MAX): Define if not already defined. 72618fd37a7SXin LI (TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Likewise. 72718fd37a7SXin LI (block_read): Accommodate ancient AIX hosts that set errno to EINTR 72818fd37a7SXin LI after uncaught SIGCONT. 72918fd37a7SXin LI (buffer_lcm): Return a reasonable size if the multiple is too large. 73018fd37a7SXin LI New arg LCM_MAX. All callers changed. 73118fd37a7SXin LI 73218fd37a7SXin LI * lib/hard-locale.c: Include "hard-locale.h". 73318fd37a7SXin LI (hard_locale): Ignore ENABLE_NLS, since we want to operate on 73418fd37a7SXin LI locales other than LC_MESSAGES. 73518fd37a7SXin LI 73618fd37a7SXin LI * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_POSIXVER. 73718fd37a7SXin LI (jm_PREREQ_POSIXVER): New macro. 73818fd37a7SXin LI 73918fd37a7SXin LI * m4/setmode.m4 (AC_FUNC_SETMODE_DOS): 74018fd37a7SXin LI Check for fcntl.h and unistd.h unconditionally. 74118fd37a7SXin LI Suggested by Bruno Haible. 74218fd37a7SXin LI 74318fd37a7SXin LI * po/LINGUAS: Add cs, ja. 74418fd37a7SXin LI * po/POTFILES.in: Add lib/c-stack.c, src/dir.c. 74518fd37a7SXin LI 74618fd37a7SXin LI * src/Makefile.am (datadir): @DATADIRNAME@ -> share. 74718fd37a7SXin LI (INCLUDES): Remove intl. 74818fd37a7SXin LI (LDADD): Change INTLLIBS to LIBINTL. 74918fd37a7SXin LI No longer need to link libdiffutils.a twice. 75018fd37a7SXin LI 75118fd37a7SXin LI * src/analyze.c (diff_2_files): 75218fd37a7SXin LI Avoid arithmetic overflow in buffer size calculation. 75318fd37a7SXin LI 75418fd37a7SXin LI * src/cmp.c: Include c-stack.h, exitfail.h. 75518fd37a7SXin LI (hard_locale_LC_MESSAGES): Depend on ENABLE_NLS. 75618fd37a7SXin LI (try_help, check_stdout, main, cmp): 2 -> EXIT_TROUBLE. 75718fd37a7SXin LI (main): Check for stack overflow. 75818fd37a7SXin LI 0 -> EXIT_SUCCESS. 75918fd37a7SXin LI 1 -> EXIT_FAILURE. 76018fd37a7SXin LI (cmp): Likewise. 76118fd37a7SXin LI Accommodate ancient AIX hosts that set errno to 76218fd37a7SXin LI EINTR after uncaught SIGCONT. 76318fd37a7SXin LI 76418fd37a7SXin LI * src/context.c (pr_context_hunk): 76518fd37a7SXin LI Do not dump core if an enormous context causes an 76618fd37a7SXin LI arithmetic overflow. 76718fd37a7SXin LI (pr_unidiff_hunk): Likewise. 76818fd37a7SXin LI (find_hunk): Likewise. 76918fd37a7SXin LI 77018fd37a7SXin LI * src/diff.h: unsigned -> unsigned int. 77118fd37a7SXin LI * src/diff.c: Include c-stack.h, exitfail.h. 77218fd37a7SXin LI Do not include signal.h. 77318fd37a7SXin LI (specify_style, specify_value): Bring these routines back, as POSIX 77418fd37a7SXin LI requires that the order of options not matter. 77518fd37a7SXin LI (shortopts): New constant. 77618fd37a7SXin LI (group_format_option, line_format_option): New constants. 77718fd37a7SXin LI (main): 0 -> EXIT_SUCCESS, 1 -> EXIT_FAILURE, 2 -> EXIT_TROUBLE. 77818fd37a7SXin LI Ensure that order of options does not matter. 77918fd37a7SXin LI Check for stack overflow. 78018fd37a7SXin LI If contexts overflow, substitute LIN_MAX, as that's good enough. 78118fd37a7SXin LI If multiple contexts are specified, use their maximum. 78218fd37a7SXin LI -c is equivalent to -C 3 now, instead of having an implicit context; 78318fd37a7SXin LI likewise for -u and -U 3. 78418fd37a7SXin LI Use specify_style and specify_value. 78518fd37a7SXin LI (SIGCHLD): Do not define; now done in a header. 78618fd37a7SXin LI Use new style time stamp format for -u / -U. 78718fd37a7SXin LI Reject numeric-string options if operating in POSIX 1003.1-2001 mode. 78818fd37a7SXin LI Avoid overflow problems with tab width. 78918fd37a7SXin LI Simplify from-file and to-file code. 79018fd37a7SXin LI (usage): Do not mention obsolete options. 79118fd37a7SXin LI (filetype): Do not mention whether a file is executable. 79218fd37a7SXin LI Add typed memory objects. 79318fd37a7SXin LI (compare_files): 0 -> EXIT_SUCCESS, 1 -> EXIT_FAILURE, 2 -> 79418fd37a7SXin LI EXIT_TROUBLE. 79518fd37a7SXin LI 79618fd37a7SXin LI * src/diff3.c: Include c-stack.h, exitfail.h. 79718fd37a7SXin LI (ALLOCATE): Remove. All uses changed to xmalloc, or to xmalloc plus 79818fd37a7SXin LI an overflow check. 79918fd37a7SXin LI (myread): Remove. 80018fd37a7SXin LI (main): Check for stack overflow. 80118fd37a7SXin LI 0 -> EXIT_SUCCESS, 1 -> EXIT_FAIULRE, 2 -> EXIT_TROUBLE. 80218fd37a7SXin LI (try_help): Likewise. 80318fd37a7SXin LI (process_diff): Check for integer overflow, to avoid core dumps. 80418fd37a7SXin LI 2 -> EXIT_TROUBLE. 80518fd37a7SXin LI (read_diff): Exit with status 126 if the file is not executable, 80618fd37a7SXin LI for compatibility with POSIX 1003.1-2001. 80718fd37a7SXin LI Accommodate ancient AIX hosts that set errno to EINTR after uncaught 80818fd37a7SXin LI SIGCONT. 80918fd37a7SXin LI Check for integer overflow to avoid core dumps. 81018fd37a7SXin LI (fatal, perror_with_exit): 2 -> EXIT_TROUBLE. 81118fd37a7SXin LI 81218fd37a7SXin LI * src/dir.c (dir_read): 81318fd37a7SXin LI Ignore st_size of directories: POSIX says it's garbage. 81418fd37a7SXin LI Check for integer overflow to avoid core dumps. 81518fd37a7SXin LI (diff_dirs): 0 -> EXIT_SUCCESS, 2 -> EXIT_TROUBLE. 81618fd37a7SXin LI 81718fd37a7SXin LI * src/ifdef.c: Include <xalloc.h>. 81818fd37a7SXin LI (format_group, print_ifdef_lines): Avoid core dumps with bad formats. 81918fd37a7SXin LI (do_printf_spec): Avoid alloca. 82018fd37a7SXin LI 82118fd37a7SXin LI * src/io.c (sip): 82218fd37a7SXin LI Avoid integer overflow and core dumps if buffer alignments are 82318fd37a7SXin LI preposterously incompatible. 82418fd37a7SXin LI (slurp): Do not dump core if the file is growing as we read it. 82518fd37a7SXin LI If a regular file grows, keep reading until we catch up with its EOF. 82618fd37a7SXin LI (find_and_hash_each_line): Check for integer overflow to avoid cores. 82718fd37a7SXin LI (GUESS_LINES): Remove. 82818fd37a7SXin LI (guess_lines): New function. Avoid integer overflow. 82918fd37a7SXin LI (find_identical_ends): Use it. 83018fd37a7SXin LI Avoid integer overflow and possible core dumps. 83118fd37a7SXin LI 83218fd37a7SXin LI * src/sdiff.c: Include c-stack.h, exitfail.h. Do not include signal.h. 83318fd37a7SXin LI 0 -> EXIT_SUCCESS, 1 -> EXIT_FAILURE, 2 -> EXIT_TROUBLE. 83418fd37a7SXin LI (ck_editor_status): New function. 83518fd37a7SXin LI (main): Check for stack overflow. 83618fd37a7SXin LI Adopt POSIX convention for subsidiary programs not found. 83718fd37a7SXin LI (diffarg): Check for integer overflow to avoid core dumps. 83818fd37a7SXin LI (trapsigs): Remove SA_INTERRUPT special case; now done by header. 83918fd37a7SXin LI (SIGCHLD): Likewise. 84018fd37a7SXin LI (edit): Adopt POSIX convention for subsidiary programs not found. 84118fd37a7SXin LI 84218fd37a7SXin LI * src/side.c: unsigned -> unsigned int. 84318fd37a7SXin LI 84418fd37a7SXin LI * src/system.h: Don't use alloca or include <alloca.h>. 84518fd37a7SXin LI unsigned -> unsigned int 84618fd37a7SXin LI (EXIT_SUCCESS, EXIT_FAILURE, EXIT_TROUBLE): Define if not defined. 84718fd37a7SXin LI Include signal.h. 84818fd37a7SXin LI (SA_RESTART): Define if not defined. 84918fd37a7SXin LI (SIGCHLD): Likewise. 85018fd37a7SXin LI 85118fd37a7SXin LI * src/util.c: 2 -> EXIT_TROUBLE. 85218fd37a7SXin LI Adopt POSIX convention for ENOEXEC and exit status 126. 85318fd37a7SXin LI unsigned -> unsigned int 85418fd37a7SXin LI 85518fd37a7SXin LI2002-01-24 Paul Eggert <eggert@twinsun.com> 85618fd37a7SXin LI 85718fd37a7SXin LI * NEWS, configure.ac (AC_INIT, AM_INIT_AUTOMAKE): Version 2.7.7. 85818fd37a7SXin LI 85918fd37a7SXin LI * intl/plural.c: Regenerate with Bison 1.31. 86018fd37a7SXin LI 86118fd37a7SXin LI * ABOUT-NLS, intl/*: Update to Gettext 0.11-pre5++. 86218fd37a7SXin LI * INSTALL: Update to Autoconf 2.52f. 86318fd37a7SXin LI 86418fd37a7SXin LI * INSTALLME: New file. 86518fd37a7SXin LI * Makefile.am (EXTRA_DIST): Add config/config.rpath, INSTALLME. 86618fd37a7SXin LI (DISTCLEANFILES): Remove. 86718fd37a7SXin LI * NEWS: Reformat for imminent 2.8 release. 86818fd37a7SXin LI * README: Mention INSTALLME. 86918fd37a7SXin LI * README-alpha: Move most of contents to INSTALLME. 87018fd37a7SXin LI * THANKS: Add Bruno Haible, Jim Meyering, and Eli Zaretskii. 87118fd37a7SXin LI 87218fd37a7SXin LI * config: New subdirectory, containing the following files from .: 87318fd37a7SXin LI config.guess, config.sub, depcomp, missing, install-sh, mkinstalldirs. 87418fd37a7SXin LI Move the following files here from doc: texinfo.tex, mdate-sh. 87518fd37a7SXin LI * config/config.guess, config/config.sub, config/texinfo.tex: 87618fd37a7SXin LI Update to latest version from FSF. 87718fd37a7SXin LI * config/config.rpath: New file, from Gettext 0.11-pre5++. 87818fd37a7SXin LI 87918fd37a7SXin LI * configure.ac (AC_INIT): Use new 3-arg form. 88018fd37a7SXin LI (AC_CONFIG_SRCDIR): Specify src/diff.c here, not in AC_INIT. 88118fd37a7SXin LI (ALL_LINGUAS): Remove: now in po/LINGUAS as per Gettext 0.11. 88218fd37a7SXin LI (AC_CONFIG_AUX_DIR): New macro invocation. 88318fd37a7SXin LI 88418fd37a7SXin LI * lib/Makefile.am (noinst_HEADERS): Add gettext.h. 88518fd37a7SXin LI * lib/gettext.h: New file, from Gettext 0.11-pre5++. 88618fd37a7SXin LI * lib/prepargs.c: Include <string.h>. Reported by Bruno Haible. 88718fd37a7SXin LI 88818fd37a7SXin LI * m4/codeset.m4, m4/gettext.m4, glibc21.m4, iconv.m4, isc-posix.m4, 88918fd37a7SXin LI lcmessage.m4, progtest.m4: Upgrade to Gettext 0.11-pre5++. 89018fd37a7SXin LI * m4/lib-ld.m4, m4/lib-link.m4, m4/lib-prefix.m4: New files, from 89118fd37a7SXin LI Gettext 0.11-pre5++. 89218fd37a7SXin LI 89318fd37a7SXin LI * po/LINGUAS: New file. 89418fd37a7SXin LI * po/Makefile.in.in: Upgrade to Gettext 0.11-pre5++. 89518fd37a7SXin LI * po/Makevars, po/Rules-quot, po/boldquot.sed: New files, 89618fd37a7SXin LI from Gettext 0.11-pre5++. 89718fd37a7SXin LI 89818fd37a7SXin LI * src/cmp.c (copyright_string): Update to 2002. 89918fd37a7SXin LI * src/diff.c (copyright_string): Likewise. 90018fd37a7SXin LI * src/diff3.c (copyright_string): Likewise. 90118fd37a7SXin LI * src/sdiff.c (copyright_string): Likewise. 90218fd37a7SXin LI 90318fd37a7SXin LI * src/cmp.c (specify_ignore_initial): Renamed from 90418fd37a7SXin LI parse_ignore_initial, with different signature, to take the 90518fd37a7SXin LI maximum of multiple options rather than the last one. 90618fd37a7SXin LI All uses changed. 90718fd37a7SXin LI 90818fd37a7SXin LI * src/cmp.c (bytes, specify_ignore_initial, cmp): Use UINTMAX_MAX 90918fd37a7SXin LI instead of (uintmax_t) -1, to avoid warnings on some compilers. 91018fd37a7SXin LI * src/io.c (file_block_read): Likewise, for SIZE_MAX. 91118fd37a7SXin LI 91218fd37a7SXin LI * src/cmp.c (usage): Reformat messages to ease translation. 91318fd37a7SXin LI * src/diff3.c (usage): Likewise. 91418fd37a7SXin LI * src/sdiff.c (usage): Likewise. 91518fd37a7SXin LI 91618fd37a7SXin LI * src/cmp.c (main): Two files with the same name are identical 91718fd37a7SXin LI only if the same offset is specified. 91818fd37a7SXin LI (block_compare_and_count): Avoid cast to unsigned char. 91918fd37a7SXin LI 92018fd37a7SXin LI * src/diff3.c (main): Remove unused variable. 92118fd37a7SXin LI 92218fd37a7SXin LI * src/dir.c: Include <setjmp.h> 92318fd37a7SXin LI (struct dirdata): New member nnames. 92418fd37a7SXin LI (locale_specific_sorting, failed_strcoll): New vars. 92518fd37a7SXin LI (dir_read): Renamed from dir_sort. Don't sort the dir. 92618fd37a7SXin LI Set new nnames member of struct dirdata. All callers changed. 92718fd37a7SXin LI (compare_names): Don't check for errno after strcasecmp. 92818fd37a7SXin LI Use strcoll only if locale_specific_sorting is nonzero. 92918fd37a7SXin LI If strcoll fails, longjmp out rather than returning a value 93018fd37a7SXin LI that might result in an invalid comparison function that might 93118fd37a7SXin LI make qsort dump core. 93218fd37a7SXin LI (diff_dirs): Sort the directory ourselves. Use setjmp to recover 93318fd37a7SXin LI from strcoll failure, falling back on native byte comparison. 93418fd37a7SXin LI Make local variables volatile if they need to preserve their value 93518fd37a7SXin LI after setjmp/longjmp. 93618fd37a7SXin LI 93718fd37a7SXin LI * src/sdiff.c (handler_index_of_SIGINT, handler_index_of_SIGPIPE): 93818fd37a7SXin LI New macros. 93918fd37a7SXin LI (main): Do not confuse signal numbers with their indices. 94018fd37a7SXin LI Bug reported by Bruno Haible. 94118fd37a7SXin LI (edit): Cat lin to long before printing with %ld, since lin might 94218fd37a7SXin LI be narrow than long. 94318fd37a7SXin LI 94418fd37a7SXin LI * src/system.h (UINTMAX_MAX): New macro. 94518fd37a7SXin LI Include gettext.h, not libgettext.h. 94618fd37a7SXin LI (N_): Do not wrap arg in parentheses. Fix from Bruno Haible. 94718fd37a7SXin LI 94818fd37a7SXin LI * src/util.c (finish_output): Ensure that werrno is initialized. 94918fd37a7SXin LI (lines_differ): Have an explicit do-nothing case for 95018fd37a7SXin LI IGNORE_NO_WHITE_SPACE, to pacify gcc -Wall. 95118fd37a7SXin LI 95218fd37a7SXin LI2001-12-29 Eli Zaretskii <eliz@is.elta.co.il> 95318fd37a7SXin LI 95418fd37a7SXin LI * src/sdiff.c (interact): After extracting rlen from the editor 95518fd37a7SXin LI command, test for a terminating null character, not for a newline. 95618fd37a7SXin LI 95718fd37a7SXin LI * ms/config.bat: Allow longer source directory names without 95818fd37a7SXin LI overflowing the line length limits. Create the cache in the 95918fd37a7SXin LI build directory, not in the source directory 96018fd37a7SXin LI * ms/config.sed: Fix AC_CONFIG_LINKS for when symlinks are 96118fd37a7SXin LI unavailable. 96218fd37a7SXin LI 96318fd37a7SXin LI2001-12-23 Paul Eggert <eggert@twinsun.com> 96418fd37a7SXin LI 96518fd37a7SXin LI * NEWS, configure.ac (AM_INIT_AUTOMAKE): Version 2.7.6. 96618fd37a7SXin LI 96718fd37a7SXin LI * configure.ac (ALL_LINGUAS): Add tr. 96818fd37a7SXin LI 96918fd37a7SXin LI * src/util.c (begin_output): 97018fd37a7SXin LI Have child exit with status 127 rather than reporting 97118fd37a7SXin LI failure on its own. Set errno to 0 before invoking popen. 97218fd37a7SXin LI (finish_output): Report errno on pclose failure. 97318fd37a7SXin LI Distinguish between subsidiary program not found, and failure. 97418fd37a7SXin LI 97518fd37a7SXin LI * src/sdiff.c (not_found, execdiff): Remove. 97618fd37a7SXin LI (DIFF_PROGRAM_OPTION): New constant. 97718fd37a7SXin LI (longopts, option_help_msgid, main): Add --diff-program=PROGRAM. 97818fd37a7SXin LI (check_stdout): New function. 97918fd37a7SXin LI (main): Remove DIFF_PROGRAM. Check stdout after printing version. 98018fd37a7SXin LI Use check_stdout after printing help. Use execvp/perror_fatail rather 98118fd37a7SXin LI than execdiff. Set errno to 0 before invoking popen. 98218fd37a7SXin LI Check for pclose failure properly. 98318fd37a7SXin LI (main, edit): If child exec fails, exit with 127 rather than trying to 98418fd37a7SXin LI print diagnostic. 98518fd37a7SXin LI Distinguish between subsidiary program failing and not being found. 98618fd37a7SXin LI (edit): Handle signals the same way, regardless of whether we're using 98718fd37a7SXin LI system or fork+exec. Check for system returning -1. 98818fd37a7SXin LI 98918fd37a7SXin LI * src/diff3.c (DIFF_PROGRAM_OPTION, HELP_OPTION): New constants. 99018fd37a7SXin LI (longopts, main): Use them. 99118fd37a7SXin LI (longopts, main, option_help_msgid): New option --diff-option=PROGRAM. 99218fd37a7SXin LI (main): Remove DIFF_PROGRAM support. 99318fd37a7SXin LI Check stdout after printing version. 99418fd37a7SXin LI (check_stdout): Report errno info if fclose fails. 99518fd37a7SXin LI (read_diff): Have child exit with status 127 when program is not found, 99618fd37a7SXin LI rather than trying to have the child report failure. Check for 99718fd37a7SXin LI pclose returning -1. 99818fd37a7SXin LI 99918fd37a7SXin LI * src/diff.c (DEFAULT_WIDTH): Remove. 100018fd37a7SXin LI (main): Use 130 instead of DEFAULT_WIDTH, since it's not really 100118fd37a7SXin LI builder-settable. Do not prepend DIFF_OPTIONS. 100218fd37a7SXin LI (check-stdout): If fclose (stdout) fails, print errno info. 100318fd37a7SXin LI (option_help_msgid): Default context is 3, not 2. 100418fd37a7SXin LI (usage): Work even if ptrdiff_t is wider than int. 100518fd37a7SXin LI 100618fd37a7SXin LI * doc/diff.texi (diff Options): Remove DIFF_OPTIONS. 100718fd37a7SXin LI (Invoking diff3, Invoking sdiff): Remove DIFF_PROGRAM. 100818fd37a7SXin LI (diff3 Options, sdiff Options): Add --diff-program. 100918fd37a7SXin LI 101018fd37a7SXin LI * src/cmp.c (valid_suffixes): 101118fd37a7SXin LI Add '0', to support suffixes like "MB" and "MiB". 101218fd37a7SXin LI (check_stdout): Don't assume that the translations of "write failed" 101318fd37a7SXin LI and of "standard output" lack '%'. 101418fd37a7SXin LI (main): Check stdout after printing version. 101518fd37a7SXin LI 101618fd37a7SXin LI * lib/setmode.c: [HAVE_FCNTL_H && HAVE_SETMODE_DOS]: Include <fcntl.h>. 101718fd37a7SXin LI [!HAVE_SETMODE_DOS]: Do not include <unistd.h>. 101818fd37a7SXin LI (set_binary_mode): Return mode (not 1) if fd is a tty. 101918fd37a7SXin LI Do not assume that O_TEXT is zero. 102018fd37a7SXin LI 102118fd37a7SXin LI * doc/diff.texi (cmp Options): 102218fd37a7SXin LI In byte counts, a plain suffix (without any integer) 102318fd37a7SXin LI is assumed to modify the integer 1. Index terms like "kibibyte". 102418fd37a7SXin LI Document plain "k". 102518fd37a7SXin LI 102618fd37a7SXin LI (Reporting Bugs): Mention bug-report archive and test version 102718fd37a7SXin LI location. Ask for "diff --version" in bug reports. 102818fd37a7SXin LI 102918fd37a7SXin LI2001-12-13 Paul Eggert <eggert@twinsun.com> 103018fd37a7SXin LI 103118fd37a7SXin LI * src/diff.c (DEFAULT_WIDTH): Remove; couldn't be changed without 103218fd37a7SXin LI also changing option_help_msgid. All uses replaced with 130. 103318fd37a7SXin LI 103418fd37a7SXin LI * lib/setmode.c: Include fcntl.h and unistd.h only if 103518fd37a7SXin LI HAVE_SETMODE_DOS. 103618fd37a7SXin LI (setmode): Assume a file is binary unless the mode is O_TEXT. 103718fd37a7SXin LI * ms/README: Fix minor typos. 103818fd37a7SXin LI 103918fd37a7SXin LI2001-12-13 Eli Zaretskii <eliz@is.elta.co.il> 104018fd37a7SXin LI 104118fd37a7SXin LI * ms/README: New file. 104218fd37a7SXin LI 104318fd37a7SXin LI * lib/setmode.c (set_binary_mode) [HAVE_SETMODE_DOS]: Don't assume 104418fd37a7SXin LI O_TEXT has a zero value. If FD is a terminal device, do nothing 104518fd37a7SXin LI and return MODE, thus pretending that it was already in the 104618fd37a7SXin LI requested MODE. 104718fd37a7SXin LI [HAVE_FCNTL_H]: Include fcntl.h (needed for O_BINARY). 104818fd37a7SXin LI 104918fd37a7SXin LI * ms/config.sed: Remove the split prevention of config.status. 105018fd37a7SXin LI Fix Sed commands for converting absolute file names into 105118fd37a7SXin LI top_srcdir-relative ones. 105218fd37a7SXin LI 105318fd37a7SXin LI * ms/config.bat: Fix typos. 105418fd37a7SXin LI 105518fd37a7SXin LI2001-12-12 Neal H Walfield <neal@cs.uml.edu> 105618fd37a7SXin LI 105718fd37a7SXin LI * diff.c (option_help_msgid): Correct the default context width 105818fd37a7SXin LI from 2 to 3. 105918fd37a7SXin LI 106018fd37a7SXin LI2001-12-11 Paul Eggert <eggert@twinsun.com> 106118fd37a7SXin LI 106218fd37a7SXin LI * m4/Makefile.am.in: Remove jm-glibc-io.m4 106318fd37a7SXin LI 106418fd37a7SXin LI * NEWS, configure.ac (AM_INIT_AUTOMAKE): Version 2.7.5. 106518fd37a7SXin LI 106618fd37a7SXin LI * configure.ac (PR_PROGRAM): Use AC_DEFINE_UNQUOTED, so that 106718fd37a7SXin LI $PR_PROGRAM is expanded by sh. 106818fd37a7SXin LI (ptrdiff_t, ssize_t): Use AC_CHECK_TYPE with a default of int, 106918fd37a7SXin LI not AC_CHECK_TYPES. 107018fd37a7SXin LI (jm_AC_DOS, AC_FUNC_SETMODE_DOS): New macros. 107118fd37a7SXin LI (AC_CONFIG_FILES): Add ms/Makefile. 107218fd37a7SXin LI 107318fd37a7SXin LI * doc/diff.texi: Add --no-ignore-file-name-case. 107418fd37a7SXin LI File name case sensitivity now affects file name exclusion. 107518fd37a7SXin LI Fix typos. 107618fd37a7SXin LI 107718fd37a7SXin LI * src/util.c: Include dirname.h. 107818fd37a7SXin LI (dir_file_pathname): Use base_name rather than file_name_lastdirchar. 107918fd37a7SXin LI 108018fd37a7SXin LI * src/system.h (S_IXUSR, S_IXGRP, S_IXOTH): New macros. 108118fd37a7SXin LI Include <libgettext.h> rather than rolling it ourselves. 108218fd37a7SXin LI (file_name_lastdirchar, HAVE_SETMODE, set_binary_mode): Remove. 108318fd37a7SXin LI 108418fd37a7SXin LI * src/sdiff.c: Include <dirname.h>. 108518fd37a7SXin LI (expand_name): Use base_name rather than file_name_lastdirchar, for 108618fd37a7SXin LI portability to DOS. 108718fd37a7SXin LI (main): Initialize xalloc_exit_failure before possibly invoking 108818fd37a7SXin LI any memory allocator. 108918fd37a7SXin LI 109018fd37a7SXin LI * src/io.c: Include setmode.h. 109118fd37a7SXin LI 109218fd37a7SXin LI * src/diff3.c (main): 109318fd37a7SXin LI Initialize xalloc_exit_failure before possibly invoking any memory 109418fd37a7SXin LI allocator. 109518fd37a7SXin LI 109618fd37a7SXin LI * src/diff.c: Include dirname.h, setmode.h. 109718fd37a7SXin LI 109818fd37a7SXin LI (main): Later values and/or styles now silently override earlier. 109918fd37a7SXin LI (specify_value, specify_style): Likewise. All callers changed. 110018fd37a7SXin LI Remove. 110118fd37a7SXin LI (binary, main, option_help_msgid, compare_files): 110218fd37a7SXin LI HAVE_SETMODE -> HAVE_SETMODE_DOS. 110318fd37a7SXin LI (NO_IGNORE_FILE_NAME_CASE_OPTION): New constant. 110418fd37a7SXin LI (longopts, main, option_help_msgid): Support it. 110518fd37a7SXin LI (exclude_options): New function. 110618fd37a7SXin LI (main): Use it. Initialize xalloc_exit_failure before potentially 110718fd37a7SXin LI allocating memory. 110818fd37a7SXin LI 110918fd37a7SXin LI (filetype): Distinguish executable files from others, as POSIX 111018fd37a7SXin LI suggests. 111118fd37a7SXin LI 111218fd37a7SXin LI (compare_files): Use base_name instead of file_name_lastdirchar. 111318fd37a7SXin LI 111418fd37a7SXin LI * src/cmp.c: Include <hard-locale.h>, <setmode.h>. 111518fd37a7SXin LI (hard_locale_LC_MESSAGES): New macro. 111618fd37a7SXin LI (sprintc): Remove int width arg; it's now the caller's responsibility 111718fd37a7SXin LI to pad. All callers changed. 111818fd37a7SXin LI (stat_buf): New static var; was formerly a local var in 'main'. 111918fd37a7SXin LI (valid_suffixes): Add 'K', for 'KiB'. 112018fd37a7SXin LI (option_help_msgid): Don't confuse bytes with characters. 112118fd37a7SXin LI (main): Set xalloc_exit_failure before invoking anything that might 112218fd37a7SXin LI allocate memory. Fix bug: -n was incorrectly ignored when optimizing 112318fd37a7SXin LI the case of regular files with different lengths. 112418fd37a7SXin LI (cmp): Use an index column wide enough to store this comparison's 112518fd37a7SXin LI indexes. In locales other than the POSIX locale, say "byte" 112618fd37a7SXin LI rather than "char". 112718fd37a7SXin LI 112818fd37a7SXin LI * ms/config.bat: pc -> ms 112918fd37a7SXin LI 113018fd37a7SXin LI * ms/Makefile.am, m4/setmode.m4, lib/setmode.c, lib/setmode.h: 113118fd37a7SXin LI New file. 113218fd37a7SXin LI 113318fd37a7SXin LI * lib/Makefile.am (noinst_HEADERS): Add dirname.h, setmode.h. 113418fd37a7SXin LI (libdiffutils_a_SOURCES): Add basename.c, setmode.c. 113518fd37a7SXin LI 113618fd37a7SXin LI * Makefile.am (SUBDIRS): Add ms. 113718fd37a7SXin LI 113818fd37a7SXin LI2001-12-10 Paul Eggert <eggert@twinsun.com> 113918fd37a7SXin LI 114018fd37a7SXin LI * m4/fnmatch.m4: Test for FNM_CASEFOLD. 114118fd37a7SXin LI 114218fd37a7SXin LI2001-12-03 Paul Eggert <eggert@twinsun.com> 114318fd37a7SXin LI 114418fd37a7SXin LI * lib/posix/regex.h: Fix copyright notice. 114518fd37a7SXin LI 114618fd37a7SXin LI2001-12-03 Paul Eggert <eggert@twinsun.com> 114718fd37a7SXin LI 114818fd37a7SXin LI * NEWS, configure.ac (AM_INIT_AUTOMAKE): Version 2.7.4. 114918fd37a7SXin LI 115018fd37a7SXin LI * diff.texi (direntry, Overview, Comparison, Binary, Invoking cmp): 115118fd37a7SXin LI Use "byte" rather than "character" when talking about cmp, since 115218fd37a7SXin LI it compares bytes, not character. 115318fd37a7SXin LI (Invoking cmp): New trailing operands FROM-SKIP and TO-SKIP. 115418fd37a7SXin LI -i or --ignore-initial now accepts FROM-SKIP:TO-SKIP. 115518fd37a7SXin LI New option -n or --bytes. 115618fd37a7SXin LI Count operands now may be in octal or hex, and may be followed by a 115718fd37a7SXin LI size multiplier. 115818fd37a7SXin LI 115918fd37a7SXin LI * configure.ac (DEFAULT_DIFF_PROGRAM): 116018fd37a7SXin LI Define to "diff", not "$bindir/diff" (which didn't work anyway). 116118fd37a7SXin LI (AC_CHECK_MEMBERS): Add struct stat.st_blksize, struct stat.st_rdev. 116218fd37a7SXin LI (AC_STRUCT_ST_BLKSIZE, AC_STRUCT_ST_RDEV): Remove; obsolescent. 116318fd37a7SXin LI (AC_FUNC_FORK): Use this, instead of obsolescent AC_FUNC_VFORK. 116418fd37a7SXin LI (AC_CONFIG_FILES, AC_CONFIG_COMMANDS): Add. 116518fd37a7SXin LI (AC_OUTPUT): Remove args; they were obsolescent. 116618fd37a7SXin LI 116718fd37a7SXin LI * util.c (setup_output, begin_output, finish_output): 116818fd37a7SXin LI HAVE_FORK -> HAVE_WORKING_FORK || HAVE_WORKING_VFORK. 116918fd37a7SXin LI * sdiff.c (diffpid, cleanup, main, edit): Likewise. 117018fd37a7SXin LI * diff3.c (read_diff): Likewise. 117118fd37a7SXin LI 117218fd37a7SXin LI * system.h (STAT_BLOCKSIZE): 117318fd37a7SXin LI Use HAVE_STRUCT_STAT_ST_BLKSIZE, not HAVE_ST_BLKSIZE. 117418fd37a7SXin LI (vfork): New macro. 117518fd37a7SXin LI (HAVE_FORK): Remove. 117618fd37a7SXin LI (set_binary_mode): New macro. 117718fd37a7SXin LI 117818fd37a7SXin LI * sdiff.c (main): HAVE_VFORK -> HAVE_WORKING_VFORK. 117918fd37a7SXin LI (edit): Reopen the temporary file after the editor has run, in case 118018fd37a7SXin LI the editor operates by unlinking the old file and linking a new one. 118118fd37a7SXin LI (P_tmpdir): Rename from PVT_tmpdir; this fixes a typo. 118218fd37a7SXin LI All uses changed. 118318fd37a7SXin LI 118418fd37a7SXin LI * io.c (sip, read_files): 118518fd37a7SXin LI Remove tests for HAVE_SETMODE; use set_binary_mode 118618fd37a7SXin LI instead of setmode. 118718fd37a7SXin LI (sip): Fix typo in backward lseek when reverting to text mode. 118818fd37a7SXin LI 118918fd37a7SXin LI * config.site, config.sed, config.bat: New file. 119018fd37a7SXin LI 119118fd37a7SXin LI * Makefile.am (EXTRA_DIST): Add xstrtol.c. 119218fd37a7SXin LI (noinst_HEADERS): Add xstrtol.h. 119318fd37a7SXin LI (libdiffutils_a_SOURCES): Add xstrtoumax.c. 119418fd37a7SXin LI 119518fd37a7SXin LI * cmp.c: <xstrtol.h>: Include. 119618fd37a7SXin LI (ignore_initial): Now an array with 2 elements. All uses changed. 119718fd37a7SXin LI (bytes): New var. 119818fd37a7SXin LI (HELP_OPTION): New constant. 119918fd37a7SXin LI (long_options, main): Use it. 120018fd37a7SXin LI (long_options, option_help_msgid, main, cmp): 120118fd37a7SXin LI Add support for -n or --bytes. 120218fd37a7SXin LI (parse_ignore_initial): New function. 120318fd37a7SXin LI (option_help_msgid, main): Add -i M:N. 120418fd37a7SXin LI (usage, main): Add two optional trailing operands, a la BSD. 120518fd37a7SXin LI (main): setmode -> set_binary_mode. 120618fd37a7SXin LI (cmp): Report byte number of what we've seen, not of the entire file. 120718fd37a7SXin LI This is to be consistent with the line number, which is always relative 120818fd37a7SXin LI with what we've seen. 120918fd37a7SXin LI 121018fd37a7SXin LI2001-12-02 Paul Eggert <eggert@twinsun.com> 121118fd37a7SXin LI 121218fd37a7SXin LI * diff.c (main, compare_files): setmode -> set_binary_mode. 121318fd37a7SXin LI 121418fd37a7SXin LI * xstrtol.c (__xstrtol): Don't accept 'Ki'; require 'KiB'. 121518fd37a7SXin LI 121618fd37a7SXin LI * xstrtol.c (__xstrtol): Add support for IEC 60027-2. 121718fd37a7SXin LI 121818fd37a7SXin LI2001-11-25 Paul Eggert <eggert@twinsun.com> 121918fd37a7SXin LI 122018fd37a7SXin LI * NEWS, configure.ac (AM_INIT_AUTOMAKE): Version 2.7.3. 122118fd37a7SXin LI 122218fd37a7SXin LI * README-alpha: New file. 122318fd37a7SXin LI 122418fd37a7SXin LI * src/Makefile.am (INCLUDES): Add -I../lib, for regex.h. 122518fd37a7SXin LI 122618fd37a7SXin LI * configure.ac: 122718fd37a7SXin LI Don't set LIB_CLOCK_GETTIME to 'none required'; set it to 122818fd37a7SXin LI the empty string instead. 122918fd37a7SXin LI 123018fd37a7SXin LI * lib/Makefile.am (EXTRA_DIST): Add strtoimax.c, strtol.c. 123118fd37a7SXin LI 123218fd37a7SXin LI * Makefile.am (SUBDIRS): Put intl before lib, so that libintl.h exists. 123318fd37a7SXin LI 123418fd37a7SXin LI * lib/Makefile.am (noinst_HEADERS): Add unlocked-io.h. 123518fd37a7SXin LI 123618fd37a7SXin LI * configure.ac (__EXTENSIONS__): New define, for the unlocked macros. 123718fd37a7SXin LI 123818fd37a7SXin LI * README: Add copyright notice. 123918fd37a7SXin LI Remove stuff that doesn't apply any more. 124018fd37a7SXin LI 124118fd37a7SXin LI * doc/diff.texi: offsets -> indices for cmp 124218fd37a7SXin LI 124318fd37a7SXin LI * src/cmp.c (option_help_msgid): offsets -> indices 124418fd37a7SXin LI 124518fd37a7SXin LI * src/diff.c (option_help_msgid): 124618fd37a7SXin LI Don't mention --binary on POSIX hosts. 124718fd37a7SXin LI 124818fd37a7SXin LI * src/sdiff.c (STRIP_TRAILING_CR_OPTION): New constant. 124918fd37a7SXin LI (longopts, option_help_msgid, main): Add -E, --ignore-tab-expansion, 125018fd37a7SXin LI --strip-trailing-cr. 125118fd37a7SXin LI 125218fd37a7SXin LI * doc/diff.texi: Change direcategory from Utilities to GNU Packages. 125318fd37a7SXin LI Add individual utilities. 125418fd37a7SXin LI Switch to Free Documentation License. 125518fd37a7SXin LI @code -> @command 125618fd37a7SXin LI @samp -> @option 125718fd37a7SXin LI GNU -> @sc{gnu} 125818fd37a7SXin LI Expand tabs to spaces, except when in an example that actually 125918fd37a7SXin LI uses tabs. 126018fd37a7SXin LI Prefer @node with just one arg. 126118fd37a7SXin LI Document -E or --ignore-tab-expansion, --strip-trailing-cr, 126218fd37a7SXin LI --ignore-file-name-case. 126318fd37a7SXin LI Regular expressions are now grep style, not Emacs style. 126418fd37a7SXin LI cmp's -c or --print-chars option is now -b or --print-bytes. 126518fd37a7SXin LI Time stamps now depend on LC_TIME. 126618fd37a7SXin LI -p now implies ^[[:alpha:]$_]. 126718fd37a7SXin LI Flags now include ' and 0. 126818fd37a7SXin LI cmp -i is an alias for --ignore-initial 126918fd37a7SXin LI Document --from-file, --to-file. 127018fd37a7SXin LI Document DIFF_OPTIONS. 127118fd37a7SXin LI 127218fd37a7SXin LI * configure.ac (AC_CHECK_FUNCS): Add gettimeofday, clock_gettime. 127318fd37a7SXin LI (LIB_CLOCK_GETTIME): New subst. 127418fd37a7SXin LI 127518fd37a7SXin LI * src/system.h: Assume C89 or better. 127618fd37a7SXin LI (_GNU_SOURCE): Remove; config.h now defines it. 127718fd37a7SXin LI (alloca): Declare like coreutils does it. 127818fd37a7SXin LI (verify, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, O_RDWR, 127918fd37a7SXin LI S_IRUSR, S_IWUSR): New macros. 128018fd37a7SXin LI (STAT_BLOCKSIZE): Parenthesize definiens. 128118fd37a7SXin LI <inttypes.h>: Include if HAVE_INTTYPES_H. 128218fd37a7SXin LI (CHAR_MAX, INT_MAX): Remove. 128318fd37a7SXin LI (PTRDIFF_MAX, SIZE_MAX): New macros. 128418fd37a7SXin LI (strtoumax): New decl. 128518fd37a7SXin LI Include stddef.h. 128618fd37a7SXin LI (bzero): Remove. 128718fd37a7SXin LI (bindtextdomain, textdomain, N_): New macros. 128818fd37a7SXin LI (ISPRINT, ISSPACE): Remove ifndef wrappers. 128918fd37a7SXin LI (ISUPPER, ISDIGIT): Remove. 129018fd37a7SXin LI (TOLOWER): New macro. 129118fd37a7SXin LI (MIN): Renamed from min; all callers changed. 129218fd37a7SXin LI (MAX): Likewise, from max. 129318fd37a7SXin LI (lin): New type. 129418fd37a7SXin LI (LIN_MAX): New macro. 129518fd37a7SXin LI (file_name_cmp): Renamed from filename_cmp. All callers changed. 129618fd37a7SXin LI (file_name_lastdirchar): Renamed from file_name_lastdirchar. 129718fd37a7SXin LI All callers changed. 129818fd37a7SXin LI (could_be_mvfs_stat_bug, could_be_nfs_stat_bug, 129918fd37a7SXin LI dev_may_have_duplicate_ino): Remove. 130018fd37a7SXin LI (HAVE_SETMODE, NULL_DEVICE): New macros. 130118fd37a7SXin LI (same_file): Do not check attributes. 130218fd37a7SXin LI (same_file_attributes): New macro. 130318fd37a7SXin LI 130418fd37a7SXin LI * src/util.c: Assume C89 or better. 130518fd37a7SXin LI int -> bool for booleans. 130618fd37a7SXin LI int -> lin for line numbers. 130718fd37a7SXin LI int -> size_t for sizes. 130818fd37a7SXin LI Use angle-brackets when including quotesys.h. 130918fd37a7SXin LI Include error.h, regex.h, xalloc.h. 131018fd37a7SXin LI (message5): sizeof -> offsetof 131118fd37a7SXin LI (begin_output): Invoke pr without -f. 131218fd37a7SXin LI (lines_differ): Renamed from line_cmp, and return bool not 3-way int. 131318fd37a7SXin LI All callers changed. 131418fd37a7SXin LI Add support for IGNORE_TAB_EXPANSION. 131518fd37a7SXin LI (change_letter): Now an array rather than a function. All 131618fd37a7SXin LI callers changed. 131718fd37a7SXin LI (translate_range): Translate line numbers to long, not lin, 131818fd37a7SXin LI for convenience with printf. 131918fd37a7SXin LI (analyze_hunk): Return enum changes instead of a count of 132018fd37a7SXin LI inserts and deletes. All callers changed. 132118fd37a7SXin LI (zalloc): New function. 132218fd37a7SXin LI 132318fd37a7SXin LI * src/side.c: Assume C89 or better. 132418fd37a7SXin LI int -> bool for booleans. 132518fd37a7SXin LI int -> lin for line numbers. 132618fd37a7SXin LI 132718fd37a7SXin LI * src/sdiff.c: Assume C89 or better. 132818fd37a7SXin LI int -> bool for booleans. 132918fd37a7SXin LI int -> lin for line numbers. 133018fd37a7SXin LI Use angle-brackets when including getopt.h, quotesys.h. 133118fd37a7SXin LI Include error.h, freesoft.h, stdio.h, xalloc.h. 133218fd37a7SXin LI (copyright_string): Use only most recent year. 133318fd37a7SXin LI (authorship_msgid, option_help_msgid): Wrap in N_(). 133418fd37a7SXin LI 133518fd37a7SXin LI (tmpname): Now volatile. 133618fd37a7SXin LI (tmpmade): Remove. 133718fd37a7SXin LI (tmp): New var. 133818fd37a7SXin LI (private_tempnam, exists, letters): Remove. 133918fd37a7SXin LI (temporary_file): New function. 134018fd37a7SXin LI (edit): Use it. 134118fd37a7SXin LI (interact): Use strtoumax, not atoi. 134218fd37a7SXin LI 134318fd37a7SXin LI * src/normal.c: Assume C89 or better. 134418fd37a7SXin LI int -> lin for line numbers. 134518fd37a7SXin LI 134618fd37a7SXin LI * src/io.c: Assume C89 or better. 134718fd37a7SXin LI int -> bool for booleans. 134818fd37a7SXin LI int -> lin for line numbers. 134918fd37a7SXin LI int -> size_t for sizes. 135018fd37a7SXin LI Use angle-brackets when including cmpbuf.h. 135118fd37a7SXin LI Include regex.h, xalloc.h. 135218fd37a7SXin LI (word): Remove; now done in system.h. 135318fd37a7SXin LI (hash_value): New type; use it instead of 'unsigned' for hash values. 135418fd37a7SXin LI (file_block_read): New function. 135518fd37a7SXin LI (sip, slurp): Use it. Now static. 135618fd37a7SXin LI (sip): Ensure block size is a multiple of word size. Clear eof flag. 135718fd37a7SXin LI (slurp): Use xalloc_die to report memory exhaustion. 135818fd37a7SXin LI (find_and_hash_each_line): Use TOLOWER instead of _tolower. 135918fd37a7SXin LI Add support for IGNORE_TAB_EXPANSION. 136018fd37a7SXin LI (prepare_text_end): Strip trailing CR if requested. 136118fd37a7SXin LI (find_identical_ends): Prepare the text only once, 136218fd37a7SXin LI if they're duplicates. 136318fd37a7SXin LI Let the compiler take advantage more of the fact that the buffers are 136418fd37a7SXin LI word-aligned. 136518fd37a7SXin LI (primes): Remove. 136618fd37a7SXin LI (prime_offset): New var. 136718fd37a7SXin LI (read_var): Use prime_offset instead of primes. 136818fd37a7SXin LI Use zalloc instead of xmalloc + bzero. 136918fd37a7SXin LI 137018fd37a7SXin LI * src/ifdef.c: Assume C89 or better. 137118fd37a7SXin LI int -> lin for line numbers. 137218fd37a7SXin LI (format_group): Use strtoumax to parse line numbers. 137318fd37a7SXin LI (format_group, print_ifdef_lines): Use do_printf_spec to 137418fd37a7SXin LI handle printf specs. 137518fd37a7SXin LI (groups_letter_value): Don't use _tolower; it's locale-dependent. 137618fd37a7SXin LI (do_printf_spec): Renamed from scan_printf_spec; now does the printing. 137718fd37a7SXin LI 137818fd37a7SXin LI * src/ed.c: Assume C89 or better. 137918fd37a7SXin LI int -> lin for line numbers (or 'long' when that's more convenient). 138018fd37a7SXin LI (print_ed_hunk): Fix bug when handling double-dot inserts. 138118fd37a7SXin LI 138218fd37a7SXin LI * src/dir.c: Assume C89 or better. 138318fd37a7SXin LI int -> bool for booleans. 138418fd37a7SXin LI Include error.h, exclude.h, xalloc.h. 138518fd37a7SXin LI 138618fd37a7SXin LI (dir_sort): Return 0 on error, 1 on success. All callers changed. 138718fd37a7SXin LI compare_names -> compare_names_for_qsort. 138818fd37a7SXin LI 138918fd37a7SXin LI (compare_names): Try strcasecmp if ignore_file_name_case. Then try 139018fd37a7SXin LI strcoll. Use file_name_cmp only as a last resort. Warn about 139118fd37a7SXin LI strcasecmp or strcoll failure. 139218fd37a7SXin LI (compare_names_for_qsort): New function. 139318fd37a7SXin LI 139418fd37a7SXin LI (diff_dirs): Use compare_names rather than filename_cmp. 139518fd37a7SXin LI 139618fd37a7SXin LI * src/diff3.c: Assume C89 or better. 139718fd37a7SXin LI int -> bool for booleans. 139818fd37a7SXin LI int -> lin for line numbers. 139918fd37a7SXin LI Use angle-brackets when including getopt.h, quotesys.h. 140018fd37a7SXin LI Include error.h, freesoft.h, inttostr.h, xalloc.h. 140118fd37a7SXin LI (copyright_string): Use only most recent year. 140218fd37a7SXin LI (authorship_msgid, option_help_msgid): Wrap in N_(). 140318fd37a7SXin LI 140418fd37a7SXin LI Rename the following variables for consistency with user-visible 140518fd37a7SXin LI option spellings. All uses changed. 140618fd37a7SXin LI (text): Renamed from always_text. 140718fd37a7SXin LI (initial_tab): Renamed from tab_align_flag. 140818fd37a7SXin LI 140918fd37a7SXin LI (horizon_lines): Remove. Remove all uses. 141018fd37a7SXin LI 141118fd37a7SXin LI (main): Invoke bindtextdomain and textdomain after setlocale. 141218fd37a7SXin LI Rename "DIFF" to "DIFF_PROGRAM". 141318fd37a7SXin LI 141418fd37a7SXin LI Try to compare file0 to file1, because this is where changes are 141518fd37a7SXin LI expected to come from. Diffing between these pairs of files is more 141618fd37a7SXin LI likely to avoid phantom changes from file0 to file1. 141718fd37a7SXin LI However, use file2 as the common file if this is a 3-way diff, 141818fd37a7SXin LI for backward compatibility. Suggested by Karl Tomlinson. 141918fd37a7SXin LI 142018fd37a7SXin LI (create_diff3_block): Use xcalloc instead of malloc + bzero. 142118fd37a7SXin LI 142218fd37a7SXin LI (INT_STRLEN_BOUND): Remove; now in system.h. 142318fd37a7SXin LI 142418fd37a7SXin LI (read_diff): Always use --horizon-lines=100 rather than trying 142518fd37a7SXin LI to guess it. 142618fd37a7SXin LI Do not pass --inhibit-hunk-merge. 142718fd37a7SXin LI Minimum chunk size is 1, not 8KiB. 142818fd37a7SXin LI Use xalloc_die to report memory exhaustion. 142918fd37a7SXin LI (undotlines): Use long for start, not int. 143018fd37a7SXin LI 143118fd37a7SXin LI * src/diff.h: Assume C89 or better. 143218fd37a7SXin LI int -> bool for booleans. 143318fd37a7SXin LI int -> lin for line numbers. 143418fd37a7SXin LI Don't include regex.h. 143518fd37a7SXin LI (enum changes): New enum. 143618fd37a7SXin LI (enum line_class): Remove; subsumed by enum changes. 143718fd37a7SXin LI (enum output_style): New constant OUTPUT_UNSPECIFIED. 143818fd37a7SXin LI 143918fd37a7SXin LI (ignore_space_change_flag, ignore_all_space_flag): Remove. 144018fd37a7SXin LI (ignore_white_space): New decl, subsuming the above two. All 144118fd37a7SXin LI uses changed. 144218fd37a7SXin LI 144318fd37a7SXin LI Rename the following decls for consistency with user-visible 144418fd37a7SXin LI option spellings. All uses changed. 144518fd37a7SXin LI (text): Renamed from always_text_flag. 144618fd37a7SXin LI (ignore_blank_lines): Renamed from ignore_blank_lines_flag. 144718fd37a7SXin LI (ignore_case): Renamed from ignore_case_flag. 144818fd37a7SXin LI (brief): Renamed from no_details_flag. 144918fd37a7SXin LI (initial_tab): Renamed from tab_align_flag. 145018fd37a7SXin LI (expand_tabs): Renamed from tab_expand_flag. 145118fd37a7SXin LI (starting_file): Renamed from dir_start_file. 145218fd37a7SXin LI (paginate): Renamed from paginate_flag. 145318fd37a7SXin LI (sdiff_merge_assist): Renamed from sdiff_help_sdiff. 145418fd37a7SXin LI (left_column): Renamed from sdiff_left_only. 145518fd37a7SXin LI (suppress_common_lines): Renamed from sdiff_skip_common_lines. 145618fd37a7SXin LI (speed_large_files): Renamed from heuristic. 145718fd37a7SXin LI (minimal): Renamed from no_discards. 145818fd37a7SXin LI 145918fd37a7SXin LI (inhibit_hunk_merge): Remove. 146018fd37a7SXin LI 146118fd37a7SXin LI (strip_trailing_cr, excluded, time_format): New decls. 146218fd37a7SXin LI 146318fd37a7SXin LI (files_can_be_treated_as_binary): Renamed from ignore_some_changes. 146418fd37a7SXin LI 146518fd37a7SXin LI (group_format, line_format): Now char const *[], not char *[]. 146618fd37a7SXin LI 146718fd37a7SXin LI (struct file_data): Buffer is now word*, not char*, as it's always 146818fd37a7SXin LI aligned and this can help the compiler. buffered_chars -> buffered 146918fd37a7SXin LI (since it's a byte count, not a char count). All uses changed. 147018fd37a7SXin LI New member `eof'. 147118fd37a7SXin LI 147218fd37a7SXin LI (FILE_BUFFER): New macro. 147318fd37a7SXin LI 147418fd37a7SXin LI (excluded_filename, error, free_software_msgid): Remove decls; now in 147518fd37a7SXin LI other .h files. 147618fd37a7SXin LI 147718fd37a7SXin LI (sip, slurp): Remove decls. 147818fd37a7SXin LI (file_block_read): New decl. 147918fd37a7SXin LI (change_letter): Now an array, not a function. 148018fd37a7SXin LI (lines_differ): Renamed from line_cmp. 148118fd37a7SXin LI (analyze_hunk): Now returns enum changes rather than two change counts. 148218fd37a7SXin LI 148318fd37a7SXin LI * src/Makefile.am (diff_LDADD): New symbol. 148418fd37a7SXin LI 148518fd37a7SXin LI * src/diff.c: Assume C89 or better. 148618fd37a7SXin LI int -> bool for booleans. 148718fd37a7SXin LI long -> off_t for line numbers. 148818fd37a7SXin LI Use angle-brackets when including getopt.h, fnmatch.h, quotesys.h. 148918fd37a7SXin LI Include error.h, exclude.h, freesoft.h, hard-locale.h, prepargs.h, 149018fd37a7SXin LI regex.h, signal.h, xalloc.h. 149118fd37a7SXin LI (copyright_string): Use only most recent year. 149218fd37a7SXin LI (authorship_msgid, option_help_msgid): Wrap in N_(). 149318fd37a7SXin LI 149418fd37a7SXin LI Rename the following variables for consistency with user-visible 149518fd37a7SXin LI option spellings. All uses changed. 149618fd37a7SXin LI (binary): Renamed from binary_flag. 149718fd37a7SXin LI (new_file): Renamed from entire_new_file_flag. 149818fd37a7SXin LI (unidirectional_new_file): Renamed from unidirectional_new_file_flag. 149918fd37a7SXin LI (report_identical_files): Renamed from print_file_same_flag. 150018fd37a7SXin LI 150118fd37a7SXin LI (numeric_arg): Remove. 150218fd37a7SXin LI 150318fd37a7SXin LI (exclude, exclude_alloc, exclude_count, excluded_filename, add_exclude, 150418fd37a7SXin LI add_exclude_file): 150518fd37a7SXin LI Remove; now done by exclude.h. 150618fd37a7SXin LI 150718fd37a7SXin LI (BINARY_OPTION, FROM_FILE_OPTION, HELP_OPTION, HORIZON_LINES_OPTION, 150818fd37a7SXin LI IGNORE_FILE_NAME_CASE_OPTION, INHIBIT_HUNK_MERGE_OPTION, 150918fd37a7SXin LI LEFT_COLUMN_OPTION, LINE_FORMAT_OPTION, NORMAL_OPTION, 151018fd37a7SXin LI SDIFF_MERGE_ASSIST_OPTION, STRIP_TRAILING_CR_OPTION, 151118fd37a7SXin LI SUPPRESS_COMMON_LINES_OPTION, TO_FILE_OPTION, 151218fd37a7SXin LI UNCHANGED_LINE_FORMAT_OPTION, OLD_LINE_FORMAT_OPTION, 151318fd37a7SXin LI NEW_LINE_FORMAT_OPTION, UNCHANGED_GROUP_FORMAT_OPTION, 151418fd37a7SXin LI OLD_GROUP_FORMAT_OPTION, NEW_GROUP_FORMAT_OPTION, 151518fd37a7SXin LI CHANGED_GROUP_FORMAT_OPTION): New constants. 151618fd37a7SXin LI (longopts, main): Use them. 151718fd37a7SXin LI 151818fd37a7SXin LI (longopts, main, option_help_msgid): Add -E, --from-file, --to-file. 151918fd37a7SXin LI 152018fd37a7SXin LI (main): Invoke bindtextdomain and textdomain after setlocale. 152118fd37a7SXin LI Use grep syntax, not Emacs, for regular expressions. 152218fd37a7SXin LI Use exclude.h, not our own functions. 152318fd37a7SXin LI Use ISO 8601 time format in hard locales. 152418fd37a7SXin LI Prepend DIFF_OPTIONS. 152518fd37a7SXin LI Don't update ignore_some_changes. 152618fd37a7SXin LI Use strtoumax instead of numeric_arg. 152718fd37a7SXin LI Use specify_value when appropriate. 152818fd37a7SXin LI error -> try_help when appropriate. 152918fd37a7SXin LI -p now means ^[[:alpha:]$_], not ^[_a-zA-Z$]. 153018fd37a7SXin LI Ignore --inhibit-hunk-merge. 153118fd37a7SXin LI Prefer changed group formats to unchanged ones. 153218fd37a7SXin LI Remove now-unnecessary casts. 153318fd37a7SXin LI Set files_can_be_treated_as_binary. 153418fd37a7SXin LI 153518fd37a7SXin LI (specify_value): Renamed from specify_format. All uses changed. 153618fd37a7SXin LI 153718fd37a7SXin LI (specify_style): Default is now unspecified, not normal. All 153818fd37a7SXin LI uses changed. 153918fd37a7SXin LI 154018fd37a7SXin LI (set_mtime_to_now): New function. 154118fd37a7SXin LI (compare_files): Use it. Use memset, not bzero. 154218fd37a7SXin LI Set stdin mtime to current time even when stdin is not a regular file. 154318fd37a7SXin LI Check for same file attributes, as well as for same file. 154418fd37a7SXin LI Use files_can_be_treated_as_binary. 154518fd37a7SXin LI "write failed" -> "standard output on output failure. 154618fd37a7SXin LI 154718fd37a7SXin LI * src/context.c: Assume C89 or better. 154818fd37a7SXin LI int -> lin for line numbers. 154918fd37a7SXin LI Include inttostr.h, regex.h. 155018fd37a7SXin LI (TIMESPEC_NS): New macro. 155118fd37a7SXin LI (nstrftime): New decl. 155218fd37a7SXin LI (print_context_label): Use nstrftime and time_format to format times. 155318fd37a7SXin LI Print numeric time stamp value if localtime fails. 155418fd37a7SXin LI (print_context_function): New function. 155518fd37a7SXin LI (pr_context_hunk, pr_unidiff_hunk): Use it. 155618fd37a7SXin LI (find_function): Use size_t for sizes, not int. 155718fd37a7SXin LI 155818fd37a7SXin LI * src/cmp.c: Assume C89 or better. 155918fd37a7SXin LI int -> bool for booleans. 156018fd37a7SXin LI long -> off_t for line numbers. 156118fd37a7SXin LI Use angle-brackets when including cmpbuf.h, getopt.h. 156218fd37a7SXin LI Include error.h, freesoft.h, inttostr.h, xalloc.h. 156318fd37a7SXin LI (copyright_string): Use only most recent year. 156418fd37a7SXin LI (authorship_msgid): Wrap in N_(). 156518fd37a7SXin LI (buffer): Now word*, not char*. All uses changed. 156618fd37a7SXin LI (word): Remove macro; now in system.h. 156718fd37a7SXin LI (long_options, option_help_msgid, main): -c --print-chars -> 156818fd37a7SXin LI -b --print-bytes 156918fd37a7SXin LI (check_stdout): "write failed" -> "standard output" 157018fd37a7SXin LI (option_help_msgid): Wrap in N_(). 157118fd37a7SXin LI (main): Invoke bindtextdomain and textdomain after setlocale. 157218fd37a7SXin LI Use strtoumax instead of doing the work ourselves. 157318fd37a7SXin LI Check for same_file_attributes as well as same_file. 157418fd37a7SXin LI (cmp): Use ssize_t for read returns, not size_t. 157518fd37a7SXin LI Do not assume that size_t is not narrower than int. 157618fd37a7SXin LI Do not assume that line numbers fit in 'long'. 157718fd37a7SXin LI (block_compare_and_count, block_compare): 157818fd37a7SXin LI Compiler now checks that buffers are word-aligned. 157918fd37a7SXin LI (block_compare_and_count): Count sizes with size_t, not long. 158018fd37a7SXin LI (sprintc): byte arg is unsigned char, not unsigned. 158118fd37a7SXin LI 158218fd37a7SXin LI * src/analyze.c: Assume C89 or better. 158318fd37a7SXin LI int -> lin for line numbers. 158418fd37a7SXin LI int -> bool for booleans. 158518fd37a7SXin LI unsigned int -> size_t for sizes. 158618fd37a7SXin LI Use angle-brackets when including cmpbuf.h. 158718fd37a7SXin LI Include error.h, regex.h, xalloc.h. 158818fd37a7SXin LI (discard_confusing_lines, diff_2_files): Use zalloc rather 158918fd37a7SXin LI than xalloc+bzero. 159018fd37a7SXin LI (discard_confusing_lines): unsigned int -> lin for values that 159118fd37a7SXin LI are really line numbers. 159218fd37a7SXin LI (shift_boundaries): Do not inhibit hunk merges. 159318fd37a7SXin LI (build_reverse_script, build_script, diff_2_files): Use |, not ||. 159418fd37a7SXin LI (diff_2_files): no_details_flag & ~ignore_some_changes -> 159518fd37a7SXin LI files_can_be_treated_as_binary. Esure that buffer size is a multiple 159618fd37a7SXin LI of sizeof (word). Use file_block_read to read buffers. 159718fd37a7SXin LI (diff_2_files): Abort if output style is not one of the 159818fd37a7SXin LI expected styles. 159918fd37a7SXin LI 160018fd37a7SXin LI2001-11-23 Paul Eggert <eggert@twinsun.com> 160118fd37a7SXin LI 160218fd37a7SXin LI * src/Makefile.am, m4/vararrays.m4: New file. 160318fd37a7SXin LI 160418fd37a7SXin LI * m4/prereq.m4 (jm_PREREQ_READUTMP): 160518fd37a7SXin LI Remove, as it gives autoheader the willies. 160618fd37a7SXin LI 160718fd37a7SXin LI * m4/README, lib/prepargs.h, lib/prepargs.c, lib/offtostr.c, 160818fd37a7SXin LI lib/umaxtostr.c, lib/inttostr.c, lib/inttostr.h, 160918fd37a7SXin LI lib/imaxtostr.c, lib/freesoft.h: New files. 161018fd37a7SXin LI 161118fd37a7SXin LI * lib/freesoft.c: Include config.h, freesoft.h rather than diff.h. 161218fd37a7SXin LI (free_software_msgid): Wrap contents in N_. 161318fd37a7SXin LI 161418fd37a7SXin LI * lib/cmpbuf.h: Use prototypes instead of old-style functions. 161518fd37a7SXin LI 161618fd37a7SXin LI * lib/cmpbuf.c: 161718fd37a7SXin LI Don't include system.h; instead, include config.h, unistd.h. 161818fd37a7SXin LI Use prototypes instead of old-style functions. 161918fd37a7SXin LI (block_read): Don't assume that int is no wider than size_t. 162018fd37a7SXin LI 162118fd37a7SXin LI * lib/Makefile.am, po/POTFILES.in: New file. 162218fd37a7SXin LI 162318fd37a7SXin LI2001-11-22 Paul Eggert <eggert@twinsun.com> 162418fd37a7SXin LI 162518fd37a7SXin LI * pc/config.h: 162618fd37a7SXin LI Define filename_cmp as an object-like macro, not as a function-like 162718fd37a7SXin LI macro. 162818fd37a7SXin LI 162918fd37a7SXin LI * exgettext: Always operate in the C locale. 163018fd37a7SXin LI Set AWK using a method that works even with broken shells. 163118fd37a7SXin LI 163218fd37a7SXin LI * doc/Makefile.am: New file. 163318fd37a7SXin LI 163418fd37a7SXin LI * configure.ac (AC_INIT): 163518fd37a7SXin LI Use src/diff.c, not diff.h, as the source files got removed. 163618fd37a7SXin LI (AM_CONFIG_HEADER): Switch from AC_CONFIG_HEADER. 163718fd37a7SXin LI (AC_ARG_PROGRAM, AC_MINIX): Remove. 163818fd37a7SXin LI 163918fd37a7SXin LI (AC_PREREQ, AM_INIT_AUTOMAKE, ALL_LINGUAS, AC_PROG_AWK, 164018fd37a7SXin LI AM_PROG_CC_STDC, AC_PROG_RANLIB, AC_C_INLINE, AC_C_VARARRAYS, 164118fd37a7SXin LI DEFAULT_DIFF_PROGRAM, DEFAULT_EDITOR_PROGRAM, 164218fd37a7SXin LI AC_STRUCT_ST_MTIM_NSEC): Add. 164318fd37a7SXin LI 164418fd37a7SXin LI (PR_PROGRAM): AC_DEFINE. 164518fd37a7SXin LI 164618fd37a7SXin LI (AC_SYS_LARGEFILE): Use instead of our homebrew version. 164718fd37a7SXin LI 164818fd37a7SXin LI (_GNU_SOURCE): Define if not defined. 164918fd37a7SXin LI 165018fd37a7SXin LI (AC_CHECK_HEADERS): Add stdbool.h, unistd.h. 165118fd37a7SXin LI (AC_CHECK_TYPES): Add ptrdiff_t, uintmax_t. 165218fd37a7SXin LI (AM_GNU_GETTEXT, XGETTEXT): Add. 165318fd37a7SXin LI 165418fd37a7SXin LI (WITH_MVFS_STAT_BUG, WITH_NFS_STAT_BUG): Remove. 165518fd37a7SXin LI (HAVE_MEMCHR): Remove. 165618fd37a7SXin LI (AC_CHECK_FUNCS): Add diraccess. 165718fd37a7SXin LI (AC_REPLACE_FUNCS): Add memchr, waitpid. 165818fd37a7SXin LI (jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_GNU_STRFTIME, jm_FUNC_MALLOC, 165918fd37a7SXin LI jm_FUNC_REALLOC, jm_PREREQ_ERROR, jm_PREREQ_QUOTEARG, jm_PREREQ_REGEX, 166018fd37a7SXin LI jm_PREREQ_TEMPNAME, jm_AC_PREREQ_XSTRTOUMAX, AC_FUNC_FNMATCH): Add. 166118fd37a7SXin LI (fnmatch.h, regex.h): Do not create these files unless we're using 166218fd37a7SXin LI our own fnmatch and regex. 166318fd37a7SXin LI 166418fd37a7SXin LI (AC_OUTPUT): Add doc/Makefile, intl/Makefile, lib/Makefile, 166518fd37a7SXin LI lib/posix/Makefile, m4/Makefile, po/Makefile.in, src/Makefile. 166618fd37a7SXin LI 166718fd37a7SXin LI * Makefile.am: New file. 166818fd37a7SXin LI 166918fd37a7SXin LI * po/en_GB.po: Don't translate "program" to "programme". 167018fd37a7SXin LI 167118fd37a7SXin LI2001-11-20 Paul Eggert <eggert@twinsun.com> 167218fd37a7SXin LI 167318fd37a7SXin LI * m4/prereq.m4: New file. 167418fd37a7SXin LI 167518fd37a7SXin LI2001-03-16 Paul Eggert <eggert@twinsun.com> 167618fd37a7SXin LI 167718fd37a7SXin LI * lib/tempname.c (uint64_t): 167818fd37a7SXin LI Define if not defined, and if UINT64_MAX is not defined. 167918fd37a7SXin LI 168018fd37a7SXin LI2001-02-26 Paul Eggert <eggert@twinsun.com> 168118fd37a7SXin LI 168218fd37a7SXin LI * lib/tempname.c: glibc 1.32 168318fd37a7SXin LI 168418fd37a7SXin LI2001-02-17 Paul Eggert <eggert@twinsun.com> 168518fd37a7SXin LI 168618fd37a7SXin LI * m4/Makefile.am.in: GNU fileutils 4.1 168718fd37a7SXin LI 168818fd37a7SXin LI2001-01-09 Paul Eggert <eggert@twinsun.com> 168918fd37a7SXin LI 169018fd37a7SXin LI * lib/tempname.c (struct_stat64): New macro. 169118fd37a7SXin LI (direxists, __gen_tempname): Use it. This avoids a portability problem 169218fd37a7SXin LI with Solaris 8. 169318fd37a7SXin LI 169418fd37a7SXin LI * lib/tempname.c (<config.h>): Include if HAVE_CONFIG_H. 169518fd37a7SXin LI (<stddef.h>, <stdint.h>, <string.h>): 169618fd37a7SXin LI Include only if STDC_HEADERS || _LIBC. 169718fd37a7SXin LI (<fcntl.h>): Include only if HAVE_FCNTL_H || _LIBC. 169818fd37a7SXin LI (<unistd.h>): Include only if HAVE_UNISTD_H || _LIBC. 169918fd37a7SXin LI (<sys/time.h>): Include only if HAVE_SYS_TIME_H || _LIBC. 170018fd37a7SXin LI (__set_errno): Define this macro if <errno.h> doesn't. 170118fd37a7SXin LI (P_tmpdir, TMP_MAX, __GT_FILE, __GT_BIGFILE, __GT_DIR, __GT_NOCREATE): 170218fd37a7SXin LI Define these macros if <stdio.h> doesn't. 170318fd37a7SXin LI (S_ISDIR, S_IRUSR, S_IWUSR, S_IXUSR): 170418fd37a7SXin LI Define these macros if <sys/stat.h> 170518fd37a7SXin LI doesn't. Ignore <sys/stat.h> S_ISDIR if STAT_MACROS_BROKEN. 170618fd37a7SXin LI (stat64, __getpid, __gettimeofday, __mkdir, __open, __open64, lxstat64, 170718fd37a7SXin LI __xstat64): Define if not _LIBC. 170818fd37a7SXin LI (__secure_getenv): Define if ! (HAVE___SECURE_GETENV || _LIBC). 170918fd37a7SXin LI (__gen_tempname): Invoke gettimeofday only if HAVE_GETTIMEOFDAY 171018fd37a7SXin LI || _LIBC; otherwise, fall back on plain "time". 171118fd37a7SXin LI Use macros like S_IRUSR | S_IWUSR rather than octal values like 0600. 171218fd37a7SXin LI 171318fd37a7SXin LI * lib/mkstemp.c (__GT_FILE): Define to zero if not defined. 171418fd37a7SXin LI 171518fd37a7SXin LI2000-10-25 Paul Eggert <eggert@twinsun.com> 171618fd37a7SXin LI 171718fd37a7SXin LI * lib/hard-locale.c: New file. 171818fd37a7SXin LI 171918fd37a7SXin LI2000-02-05 Paul Eggert <eggert@twinsun.com> 172018fd37a7SXin LI 172118fd37a7SXin LI * exgettext: From GCC repository 172218fd37a7SXin LI 172318fd37a7SXin LI1999-07-06 Paul Eggert <eggert@twinsun.com> 172418fd37a7SXin LI 172518fd37a7SXin LI * lib/mkstemp.c: glibc 2.2 172618fd37a7SXin LI 172718fd37a7SXin LI1998-12-11 Paul Eggert <eggert@twinsun.com> 172818fd37a7SXin LI 172918fd37a7SXin LI * src/sdiff.c (lf_snarf): 173018fd37a7SXin LI Fix bug when help line wrapped around the input buffer. 173118fd37a7SXin LI 173218fd37a7SXin LI1998-09-15 Paul Eggert <eggert@twinsun.com> 173318fd37a7SXin LI 173418fd37a7SXin LI * diff.texi: Add @dircategory and @direntry. 173518fd37a7SXin LI 173618fd37a7SXin LI1998-09-14 Paul Eggert <eggert@twinsun.com> 173718fd37a7SXin LI 173818fd37a7SXin LI * Makefile.in (VERSION): Version 2.7.2. 173918fd37a7SXin LI (DEFAULT_DIFF_PROGRAM): Renamed from DIFF_PROGRAM. 174018fd37a7SXin LI (PR_PROGRAM): All `configure' to define it. 174118fd37a7SXin LI (srcs): Add $(diffutils_srcs), freesoft.c, quotearg.c instead of 174218fd37a7SXin LI quote.c, quotearg.h. 174318fd37a7SXin LI (distfiles): Add acconfig.h, message/*. 174418fd37a7SXin LI (all): Depend on $(destfiles), not info. 174518fd37a7SXin LI (version.c): Parenthesize `GNU diffutils'. 174618fd37a7SXin LI (common_o): Add freesoft.o 174718fd37a7SXin LI (diff_o): quote.o -> quotearg.o 174818fd37a7SXin LI (diff3_o, sdiff_o): Likewise. 174918fd37a7SXin LI (diff.dvi): Depend on version.texi. 175018fd37a7SXin LI (diff.o diff3.o quotearg.o sdiff.o util.o): 175118fd37a7SXin LI New dependency on quotearg.h 175218fd37a7SXin LI (diff3.o): DIFF_PROGRAM -> DEFAULT_DIFF_PROGRAM. 175318fd37a7SXin LI (sdiff.o): Likewise. 175418fd37a7SXin LI (messages.po): Remove. 175518fd37a7SXin LI (message/msgid.po, message/template.po): New rules. 175618fd37a7SXin LI (maintainer-clean): Renamed from realclean. 175718fd37a7SXin LI (install): Install from source directory, if applicable. 175818fd37a7SXin LI Invoke install-info if needed. 175918fd37a7SXin LI (install-strip): New rule. 176018fd37a7SXin LI (check): Set DIFF. 176118fd37a7SXin LI (stamp-h.in): Don't put the date into the timestamp. 176218fd37a7SXin LI (D_dirs): Add $D/message. 176318fd37a7SXin LI ($D.tar.gz): Compress with gzip -9. 176418fd37a7SXin LI Don't use ln to create distribution; it doesn't work with symlinks. 176518fd37a7SXin LI (srcs, distfiles, diff_o, diff3_o, sdiff_o): Rename quotearg.c to 176618fd37a7SXin LI quotesys.c and quotearg.h to quotesys.h. 176718fd37a7SXin LI 176818fd37a7SXin LI * configure.in (AC_PATH_PROG): Add PR_PROGRAM. 176918fd37a7SXin LI If available, prefer support for large files unless the user specified 177018fd37a7SXin LI one of the CPPFLAGS, LDFLAGS, or LIBS variables. 177118fd37a7SXin LI (AC_STRUCT_ST_RDEV): Add. 177218fd37a7SXin LI (HAVE_ST_FSTYPE_STRING): Add. 177318fd37a7SXin LI (--with-mvfs-stat-bug, --with-nfs-stat-bug): New options. 177418fd37a7SXin LI (HAVE_MEMCHR): New macro. 177518fd37a7SXin LI (AC_CHECK_FUNCS): Add sicprocmask. 177618fd37a7SXin LI 177718fd37a7SXin LI * diff.h (XTERN): Renamed from EXTERN. 177818fd37a7SXin LI (struct filedata): Remove dir_p arg. 177918fd37a7SXin LI (struct comparison): New type. 178018fd37a7SXin LI (diff_2_files, diff_dirs)" Ise ot/ 178118fd37a7SXin LI (error): Add printf attribute if applicable. 178218fd37a7SXin LI (free_software_msgid): New decl. 178318fd37a7SXin LI (pr_program): New decl. 178418fd37a7SXin LI (fatal): Add noreturn attribute. 178518fd37a7SXin LI (pfatal_with_name): Likewise. 178618fd37a7SXin LI 178718fd37a7SXin LI * system.h (__attribute__): New macro. 178818fd37a7SXin LI (getenv): Don't declare if HAVE_STDLIB_H. 178918fd37a7SXin LI (CHAR_MAX): New macro. 179018fd37a7SXin LI (<locale.h>): New include. 179118fd37a7SXin LI (<locale.h>): Include before <libintl.h>. 179218fd37a7SXin LI (could_be_mvfs_stat_bug, could_be_nfs_stat_bug, 179318fd37a7SXin LI dev_may_have_duplicate_ino, same_special_file): New macros. 179418fd37a7SXin LI (same_file): Use them. 179518fd37a7SXin LI 179618fd37a7SXin LI * cmp.c (authorship_msgid): New var. 179718fd37a7SXin LI (free_software_msgid): New decl. 179818fd37a7SXin LI (error): Now has printf attribute. 179918fd37a7SXin LI (try_help): Likewise. 180018fd37a7SXin LI (long_options): Don't assume ASCII. 180118fd37a7SXin LI (try_help): Now accepts operand arg. 180218fd37a7SXin LI (main): Check for -1, not EOF, when calling getopt_long. 180318fd37a7SXin LI Report --ignore-initial value when complaining about it. 180418fd37a7SXin LI Output copyright and free software info with -v. 180518fd37a7SXin LI Don't assume ASCII. 180618fd37a7SXin LI Report last operand when one is missing. 180718fd37a7SXin LI Report text of extra operand. 180818fd37a7SXin LI Move block_read into cmpbuf.c. 180918fd37a7SXin LI 181018fd37a7SXin LI * diff.c (authorship_msgid): New var. 181118fd37a7SXin LI (quotesys.h): Include. 181218fd37a7SXin LI (ck_atoi): Remove. 181318fd37a7SXin LI (function_regexp_list, ignore_regexp_list): Now static. 181418fd37a7SXin LI (binary_flag): Renamed from binary_I_O. 181518fd37a7SXin LI (entire_new_file_flag, unidirectional_new_file_flag, 181618fd37a7SXin LI print_file_same_flag): Now static. 181718fd37a7SXin LI (numeric_arg): Renamed from ck_atoi. 181818fd37a7SXin LI New argument specifying the argument type. 181918fd37a7SXin LI (longopts, main): Don't assume ASCII. 182018fd37a7SXin LI (longopts): Remove old aliases --file-label, --entire-new-file, 182118fd37a7SXin LI --ascii, --print. 182218fd37a7SXin LI (main): Check for -1, not EOF, when calling getopt_long. 182318fd37a7SXin LI Use numeric_arg to report errors. 182418fd37a7SXin LI Report error if -l specified but pagination is not supported. 182518fd37a7SXin LI Report error if -S is specified twice with conflicting values. 182618fd37a7SXin LI Have --version conform to the new GNU standards. 182718fd37a7SXin LI Add new --from-file, --to-file, --inhibit-hun,-merge options. 182818fd37a7SXin LI Make the horizon at least as large as the context. 182918fd37a7SXin LI Add casts to pacify gcc -Wall. 183018fd37a7SXin LI (try_help): Add operand arg. 183118fd37a7SXin LI (option_help_msgid): Doc fix to match above. 183218fd37a7SXin LI (usage): Indent option_help_msgid. 183318fd37a7SXin LI (compare_files): Now takes struct comparison 183418fd37a7SXin LI instead of two directory names and a depth. 183518fd37a7SXin LI (NONEXISTENT, UNOPENED, ERRNO_ENCODE, ERRNO_DECODE): 183618fd37a7SXin LI New macros. 183718fd37a7SXin LI (DIR_P): New macro. 183818fd37a7SXin LI Report error if fflush does. 183918fd37a7SXin LI 184018fd37a7SXin LI * cmpbuf.c (block_read): Moved here from cmp.c. 184118fd37a7SXin LI 184218fd37a7SXin LI * cmpbuf.h (block_read): New decl. 184318fd37a7SXin LI 184418fd37a7SXin LI * io.c (cmpbuf.h): Include. 184518fd37a7SXin LI (slurp): Check for arithmetic overflow when computing buffer size. 184618fd37a7SXin LI 184718fd37a7SXin LI * dir.c (diff_dirs): Check for recursive directory loop. 184818fd37a7SXin LI Arg is now struct comparison const *. 184918fd37a7SXin LI (dir_loop): New function 185018fd37a7SXin LI 185118fd37a7SXin LI * analyze.c (no_discards): Remove. 185218fd37a7SXin LI (inhibit): Remove. 185318fd37a7SXin LI (shift_boundaries): Don't inhibit. If inhibit_hunk_merge is nonzero, 185418fd37a7SXin LI don't merge hunks. 185518fd37a7SXin LI (briefly_report): Now returns 2 if trouble, CHANGES otherwise. 185618fd37a7SXin LI (diff_2_files): Now takes struct comparison. If briefly_report reports 185718fd37a7SXin LI trouble, pass it on to caller. 185818fd37a7SXin LI 185918fd37a7SXin LI * side.c (print_half_line): Add brackets to pacify GCC -Wall. 186018fd37a7SXin LI 186118fd37a7SXin LI * sdiff.c (quotesys.h): Include. 186218fd37a7SXin LI (DIFF_PROGRAM, DEFAULT_EDITOR_PROGRAM): Remove. 186318fd37a7SXin LI (free_software_msgid, editor_program, not_found): New vars. 186418fd37a7SXin LI (diffbin, edbin): Remove. 186518fd37a7SXin LI (editor_program): Renamed from edbin. 186618fd37a7SXin LI (edit, interact): Now take extra string arg. 186718fd37a7SXin LI (exiterr, fatal, perror_fatal, try_help): Add noreturn attribute. 186818fd37a7SXin LI (sigset_t, sigemptyset, sigmask, sigaddset, SIG_BLOCK, SIG_SETMASK): 186918fd37a7SXin LI (sigprocmask): New macros, if !HAVE_SIGPROCMASK. 187018fd37a7SXin LI (error): Now has printf attribute. 187118fd37a7SXin LI (longopts, main): Don't assume ASCII. 187218fd37a7SXin LI (try_help): New operand arg. 187318fd37a7SXin LI (usage): Conform to new GNU standards. 187418fd37a7SXin LI (main): Set static vars for editor and diff program. 187518fd37a7SXin LI Compare getopt_long result to -1, not EOF. 187618fd37a7SXin LI -v conforms to new GNU standard. 187718fd37a7SXin LI Complain better about extra and missing operands. 187818fd37a7SXin LI If HAVE_VFORK, block SIGINT and SIGPIPE in the parent, since when 187918fd37a7SXin LI the child munges its handlers it may somp on the parent. 188018fd37a7SXin LI Pass rname to intract. 188118fd37a7SXin LI Translate not-found message before forking. 188218fd37a7SXin LI (give_help): Just output it all at once. 188318fd37a7SXin LI (edit): New args lname, lline, rname, rline. 188418fd37a7SXin LI (edit): New command 'd'. 188518fd37a7SXin LI (interact): New args lname, rname. 188618fd37a7SXin LI 188718fd37a7SXin LI * util.c (quotesys.h): Include. 188818fd37a7SXin LI (PR_PROGRAM): New macro. 188918fd37a7SXin LI (pfatal_with_name): Abort if error returns. 189018fd37a7SXin LI (fatal): Likewise. 189118fd37a7SXin LI (print_message_queue): Free message chain after printing. 189218fd37a7SXin LI (currently_recursive): Renamed from current_depth, and now a boolean. 189318fd37a7SXin LI (begin_output): Report error if fflush does. 189418fd37a7SXin LI Avoid stdio and gettext in child. 189518fd37a7SXin LI 189618fd37a7SXin LI * diff3.c (quotesys.h): Include. 189718fd37a7SXin LI (free_software_msgid): New decl. 189818fd37a7SXin LI (RANGE_START, RANGE_END): Renamed from START and END. 189918fd37a7SXin LI (fatal, perror_with_exit, try_help): Add noreturn attribute. 190018fd37a7SXin LI (error): Add printf attribute. 190118fd37a7SXin LI (diff_program): Now a ptr, not an array. 190218fd37a7SXin LI Initialize to DEFAULT_DIFF_PROGRAM instead of DIFF_PROGRAM. 190318fd37a7SXin LI (longopts, main): Don't assume ASCII. 190418fd37a7SXin LI (main): Use DIFF environment var to specify name of diff program. 190518fd37a7SXin LI Compare getopt_long result to -1, not EOF. 190618fd37a7SXin LI -v now reports version according to new GNU standard. 190718fd37a7SXin LI Report spelling of extra operand, or last operand before missing one. 190818fd37a7SXin LI (try_help): Now takes operand arg. 190918fd37a7SXin LI (option_help_ms): Fix typo: missing comma. 191018fd37a7SXin LI (usage): Update as per current GNU standards. 191118fd37a7SXin LI (environ): Remove decl. 191218fd37a7SXin LI (read_diff): Invoke diff with --inhibit-hunk-merge. 191318fd37a7SXin LI Translate `not found' message before forking. 191418fd37a7SXin LI Quote name of diff program. 191518fd37a7SXin LI Pass horizon lines. 191618fd37a7SXin LI `memory exhausted' -> `Memory exhausted' 191718fd37a7SXin LI 191818fd37a7SXin LI * pc/makefile (%.exe): Remove. 191918fd37a7SXin LI (pc-clean): Remove *.exe 192018fd37a7SXin LI * pc/makefile.sed (DEFAULT_DIFF_PROGRAM): Renamed from DIFF_PROGRAM. 192118fd37a7SXin LI When editing mkinstalldirs rule, look for exec_prefix and prefix. 192218fd37a7SXin LI Add .exe when installing files. 192318fd37a7SXin LI * pc/emx/config.h (same_file): Add. 192418fd37a7SXin LI * pc/config.h (same_file): Remove. 192518fd37a7SXin LI * pc/djgpp/config.h: Adjust to latest patch from eliz. 192618fd37a7SXin LI * pc/djgpp/makefile.sed: Don't alter PROGRAMS. 192718fd37a7SXin LI * pc/pc.c: Update FSF address. 192818fd37a7SXin LI (quote_system_arg): Renamed from system_quote_arg. 192918fd37a7SXin LI 193018fd37a7SXin LI * README: Add --with-mvfs-stat-bug, --with-nfs-stat-bug. 193118fd37a7SXin LI 193218fd37a7SXin LI * getmsgids: Add copyright date and update FSF address. 193318fd37a7SXin LI 193418fd37a7SXin LI * diff.texi: Document recent changes. 193518fd37a7SXin LI The patch doc still corresponds to patch 2.2, unfortunately. 193618fd37a7SXin LI Update GNU bug reporting address. Omit Larry Wall's address; 193718fd37a7SXin LI it's obsolete and he's busy with perl. 193818fd37a7SXin LI 193918fd37a7SXin LI * context.c: Fix spacing. 194018fd37a7SXin LI 194118fd37a7SXin LI * NEWS: Mention --from-file=FILE, --to-file=FILE, ed. 194218fd37a7SXin LI 194318fd37a7SXin LI * acconfig.h, freesoft.c, message/de.po, message/en_UK.po, 194418fd37a7SXin LI message/es.po, message/fr.po, message/pl.po, message/sv.po: 194518fd37a7SXin LI New files. 194618fd37a7SXin LI 194718fd37a7SXin LI * ed.c: Remove `#if 0'ed code. 194818fd37a7SXin LI 194918fd37a7SXin LI * normal.c, waitpid.c: Update FSF address. 195018fd37a7SXin LI 195118fd37a7SXin LI1998-03-15 Paul Eggert <eggert@twinsun.com> 195218fd37a7SXin LI 195318fd37a7SXin LI * quotesys.c: Renamed from quotearg.c. 195418fd37a7SXin LI 195518fd37a7SXin LI * quotesys.h: Renamed from quotearg.h 195618fd37a7SXin LI (__QUOTESYS_P): Renamed from __QUOTEARG_P. 195718fd37a7SXin LI 195818fd37a7SXin LI1997-05-05 Paul Eggert <eggert@twinsun.com> 195918fd37a7SXin LI 196018fd37a7SXin LI * quotesys.c, quotesys.h: New file. 196118fd37a7SXin LI 196218fd37a7SXin LIMon Nov 14 05:10:56 1994 Paul Eggert <eggert@twinsun.com> 196318fd37a7SXin LI 196418fd37a7SXin LI Add internationalization support. 196518fd37a7SXin LI Several messages have been changed slightly, 196618fd37a7SXin LI to make them more consistent and easier to translate. 196718fd37a7SXin LI All strings that are messages are passed through gettext once before 196818fd37a7SXin LI being used, so that they can be localized. 196918fd37a7SXin LI Each function and macro whose first parameter is a gettext msgid 197018fd37a7SXin LI has had its first parameter's name changed so it ends in `msgid'. 197118fd37a7SXin LI All arrays of msgids have had their names changed to end in `msgid'. 197218fd37a7SXin LI `getmsgids' uses this to determine which strings are msgids. 197318fd37a7SXin LI 197418fd37a7SXin LI * pc/COPYING, pc/INSTALL, pc/config.h, 197518fd37a7SXin LI pc/djgpp/config.h, pc/djgpp/makefile.sed, 197618fd37a7SXin LI pc/emx/config.h, pc/emx/diff.def, pc/emx/gnuregex.def, 197718fd37a7SXin LI pc/emx/makefile.sed, 197818fd37a7SXin LI pc/makefile, pc/makefile.sed, pc/pc.c: New files, for PC support. 197918fd37a7SXin LI 198018fd37a7SXin LI * getmsgids: New file. 198118fd37a7SXin LI 198218fd37a7SXin LI * Makefile.in (PACKAGE, VERSION, diffutils_srcs, D): New vars. 198318fd37a7SXin LI (version.c, version.texi, messages.po): New files. 198418fd37a7SXin LI messages.po is built automatically from source files and `getmsgids'. 198518fd37a7SXin LI (distfiles): Add them, pc/*, and getmsgids. 198618fd37a7SXin LI (diff.info): Now depends on version.texi. 198718fd37a7SXin LI (realclean): Clean messages.po, version.*. 198818fd37a7SXin LI (dist): Just build $D.tar.gz. 198918fd37a7SXin LI ($D.tar.gz): New file, takes over old `dist' function. 199018fd37a7SXin LI Don't assume $(distfiles) are all in same directory. 199118fd37a7SXin LI 199218fd37a7SXin LI * configure.in (AC_CHECK_HEADERS): Add libintl.h, locale.h. 199318fd37a7SXin LI (AC_CHECK_LIB): Check for -lintl. 199418fd37a7SXin LI 199518fd37a7SXin LI * analyze.c (briefly_report): Rewrite `message (A?"B":"C")' as 199618fd37a7SXin LI `if (A) message ("B") : message ("C")'; this is for getmsgids. 199718fd37a7SXin LI (briefly_report, diff_2_files): For label, use file_label if set. 199818fd37a7SXin LI * diff.c (compare_files): Likewise. 199918fd37a7SXin LI 200018fd37a7SXin LI * system.h (gettext): Declare; use a stub if ! HAVE_LIBINTL_H. 200118fd37a7SXin LI (setlocale): Declare; use a stub if ! HAVE_LOCALE_H. 200218fd37a7SXin LI 200318fd37a7SXin LI * cmp.c, diff.c, diff3.c, sdiff.c (main): 200418fd37a7SXin LI Invoke setlocale first thing, to tell library we're internationalized. 200518fd37a7SXin LI (option_help_msgid): New constant. 200618fd37a7SXin LI (usage): Use it, so message is translated one option at a time. 200718fd37a7SXin LI * sdiff (help_msgid, give_help): Likewise. 200818fd37a7SXin LI 200918fd37a7SXin LI * cmp.c (sprintc): Renamed from `printc'. 201018fd37a7SXin LI Now outputs to a buffer instead of stdout. 201118fd37a7SXin LI (cmp): Use new sprintc; it's easier to internationalize. 201218fd37a7SXin LI 201318fd37a7SXin LI * diff.c (main): -D FOO now outputs `/* ! FOO */ instead of 201418fd37a7SXin LI `/* not FOO */'. 201518fd37a7SXin LI 201618fd37a7SXin LI * sdiff.c (version_string): Fix decl typo: `const' was missing. 201718fd37a7SXin LI (trapsigs): Ignore sigaction failure, to be compatible with `signal'. 201818fd37a7SXin LI 201918fd37a7SXin LI * util.c (struct msg, message5, print_message_queue): 202018fd37a7SXin LI Allocate just one block of memory to save a message. 202118fd37a7SXin LI 202218fd37a7SXin LIWed Nov 9 17:42:44 1994 Paul Eggert <eggert@twinsun.com> 202318fd37a7SXin LI 202418fd37a7SXin LI * sdiff.c (trapsigs): Don't check signal return value, since it's 202518fd37a7SXin LI bogus under djgpp. 202618fd37a7SXin LI 202718fd37a7SXin LIMon Oct 31 07:27:27 1994 Paul Eggert <eggert@twinsun.com> 202818fd37a7SXin LI 202918fd37a7SXin LI * Makefile.in (srcs, diff_o, diff3_o, sdiff_o): 203018fd37a7SXin LI New files quote.c, quote.o. 203118fd37a7SXin LI 203218fd37a7SXin LI * diff.h (function_regexp, ignore_regexp): Replace lists of compiled 203318fd37a7SXin LI regexps with these single compiled regexps. All users changed. 203418fd37a7SXin LI (regexp_list,function_regexp_list,ignore_regexp_list): Move to diff.c. 203518fd37a7SXin LI * diff.c (add_regexp): Build one big regexp instead of a regexp list. 203618fd37a7SXin LI (summarize_regexp_list): New function. 203718fd37a7SXin LI (regexp_list): Redesigned struct; moved here from diff.h. 203818fd37a7SXin LI (function_regexp_list, ignore_regexp_list): Likewise, for vars. 203918fd37a7SXin LI 204018fd37a7SXin LI * context.c (find_function): Simplify interface: 204118fd37a7SXin LI don't return size of function line. All callers changed. 204218fd37a7SXin LI (print_context_script, find_function): INT_MAX now denotes no 204318fd37a7SXin LI previous match; this is simpler than `- file->prefix_lines - 1'. 204418fd37a7SXin LI 204518fd37a7SXin LI * diff3.c (read_diff): Quote arguments with system_quote_arg. 204618fd37a7SXin LI * sdiff.c (main): Use system_quote_arg to compute command. 204718fd37a7SXin LI * diff.c (option_list): Quote options with system_quote_arg. 204818fd37a7SXin LI * util.c (begin_output): Use system_quote_arg to compute command. 204918fd37a7SXin LI 205018fd37a7SXin LI * util.c (pr_program): New var. 205118fd37a7SXin LI (analyze_hunk): Fix off-by-1 line length bug. 205218fd37a7SXin LI Match with one big regexp instead of a list of regexps. 205318fd37a7SXin LI Use new `trivial_length' local instead of comparing first byte to `\n'. 205418fd37a7SXin LI Help the compiler with linbuf local vars. 205518fd37a7SXin LI 205618fd37a7SXin LI * system.h (system_quote_arg): 205718fd37a7SXin LI New function; replaces SYSTEM_QUOTE_ARG macro. 205818fd37a7SXin LI 205918fd37a7SXin LISat Oct 15 20:09:12 1994 Paul Eggert <eggert@twinsun.com> 206018fd37a7SXin LI 206118fd37a7SXin LI * system.h (_tolower): Define if not already defined. 206218fd37a7SXin LI * io.c (find_and_hash_each_line): Change tolower to _tolower; this 206318fd37a7SXin LI speeds up diff -i considerably on some hosts (e.g. Solaris 2.3). 206418fd37a7SXin LI * util.c (line_cmp): Likewise. 206518fd37a7SXin LI * ifdef.c (groups_letter_value): Likewise. 206618fd37a7SXin LI 206718fd37a7SXin LI * diff.h (ignore_some_line_changes): Remove. All users changed. 206818fd37a7SXin LI * io.c (find_and_hash_each_line): Don't invoke line_cmp if the length 206918fd37a7SXin LI differs and -i is in force. Don't assume ISSPACE ('\n') is nonzero. 207018fd37a7SXin LI 207118fd37a7SXin LI * diff.h (xmalloc_exit_failure): New variable. 207218fd37a7SXin LI All `main' programs set this variable at the start. 207318fd37a7SXin LI xmalloc and xrealloc are now taken from GNU library. 207418fd37a7SXin LI * cmp.c (main): Align buffer size to word size; some mallocs care. 207518fd37a7SXin LI * io.c (slurp): Likewise. 207618fd37a7SXin LI * diff.c (add_exclude): Can now assume xrealloc (0, ...) works. 207718fd37a7SXin LI (add_regexp): Free storage on failure. Allocate storage all at one go. 207818fd37a7SXin LI * system.h (malloc, realloc): Remove unused declarations. 207918fd37a7SXin LI * diff3.c, sdiff.c, util.c (xmalloc, xrealloc): Remove. 208018fd37a7SXin LI * sdiff.c (diffarg): Take advantage of cleaner xrealloc semantics. 208118fd37a7SXin LI 208218fd37a7SXin LI * io.c (ROL): Use sizeof to make it more generic. 208318fd37a7SXin LI 208418fd37a7SXin LI * Makefile.in (common_o): New variable. 208518fd37a7SXin LI Link error.o and xmalloc.o into all programs. 208618fd37a7SXin LI (check): Depend on $(PROGRAMS). 208718fd37a7SXin LI 208818fd37a7SXin LI * diff.h (error): Change to GNU library standard. All callers changed. 208918fd37a7SXin LI * diff3.c (main): Use strerror (EISDIR) instead of "Is a directory". 209018fd37a7SXin LI (fatal, perror_with_exit): Use `error'. 209118fd37a7SXin LI * util.c (perror_with_name, fatal): Use GNU `error'. 209218fd37a7SXin LI (error): Remove. 209318fd37a7SXin LI 209418fd37a7SXin LIWed Oct 12 17:04:40 1994 David J. MacKenzie (djm@duality.gnu.ai.mit.edu) 209518fd37a7SXin LI 209618fd37a7SXin LI * cmp.c (main): Set xmalloc_exit_failure. 209718fd37a7SXin LI 2098f5e00e24SAndrey A. ChernovSat Oct 1 05:24:19 1994 Paul Eggert <eggert@twinsun.com> 2099f5e00e24SAndrey A. Chernov 2100f5e00e24SAndrey A. Chernov * Version 2.7 released. 2101f5e00e24SAndrey A. Chernov 2102f5e00e24SAndrey A. Chernov * configure.in (AC_HEADER_SYS_WAIT): Add. 2103f5e00e24SAndrey A. Chernov (AC_CHECK_HEADERS): Remove sys/wait.h. 2104f5e00e24SAndrey A. Chernov (AC_CHECK_FUNCS): Add tmpnam. 2105f5e00e24SAndrey A. Chernov * system.h (<sys/wait.h>, WEXITSTATUS): Use simpler scheme 2106f5e00e24SAndrey A. Chernov now that HAVE_SYS_WAIT_H is not set on hosts 2107f5e00e24SAndrey A. Chernov that are incompatible with Posix applications. 2108f5e00e24SAndrey A. Chernov 2109f5e00e24SAndrey A. Chernov * util.c (dir_file_pathname): Use filename_lastdirchar not strrchr. 2110f5e00e24SAndrey A. Chernov * sdiff.c (expand_name): Likewise. 2111f5e00e24SAndrey A. Chernov (private_tempnam): Use tmpnam if HAVE_TMPNAM; this simplifies porting. 2112f5e00e24SAndrey A. Chernov (exists, letters): Omit if HAVE_TMPNAM. 2113f5e00e24SAndrey A. Chernov 2114f5e00e24SAndrey A. Chernov * diff3.c (read_diff): If STAT_BLOCKSIZE yields zero, 2115f5e00e24SAndrey A. Chernov adjust it to a more reasonable value. 2116f5e00e24SAndrey A. Chernov 2117f5e00e24SAndrey A. ChernovSat Sep 24 20:36:40 1994 Paul Eggert <eggert@twinsun.com> 2118f5e00e24SAndrey A. Chernov 2119f5e00e24SAndrey A. Chernov * sdiff.c (exists, private_tempname): Adopt latest GNU libc algorithm. 2120f5e00e24SAndrey A. Chernov (private_tempnam): Specialize for sdiff to avoid portability problems. 2121f5e00e24SAndrey A. Chernov 2122f5e00e24SAndrey A. ChernovThu Sep 22 16:47:00 1994 Paul Eggert <eggert@twinsun.com> 2123f5e00e24SAndrey A. Chernov 2124f5e00e24SAndrey A. Chernov * configure.in (AC_ARG_PROGRAM): Added. 2125f5e00e24SAndrey A. Chernov (AC_OUTPUT): Add [date > stamp-h]. 2126f5e00e24SAndrey A. Chernov 2127f5e00e24SAndrey A. Chernov * Makefile.in (DEFAULT_EDITOR_PROGRAM, DIFF_PROGRAM, LIBOBJS, 2128f5e00e24SAndrey A. Chernov NULL_DEVICE, PR_PROGRAM, PROGRAMS): New variables. 2129f5e00e24SAndrey A. Chernov (check, stamp-h.in, cmp.o, util.o): New targets. 2130f5e00e24SAndrey A. Chernov (edit_program_name): New variable; replaces old binprefix method. 2131f5e00e24SAndrey A. Chernov (install, uninstall): Use it. 2132f5e00e24SAndrey A. Chernov (binprefix): Removed. 2133f5e00e24SAndrey A. Chernov (distfiles): Add stamp-h.in. 2134f5e00e24SAndrey A. Chernov (clean): Clean stamp-h. 2135f5e00e24SAndrey A. Chernov (config.hin, config.h): Use time stamp files. 2136f5e00e24SAndrey A. Chernov (cmp_o): Add $(LIBOBJS). 2137f5e00e24SAndrey A. Chernov (install): Install info files from srcdir if they're not in `.'. 2138f5e00e24SAndrey A. Chernov 2139f5e00e24SAndrey A. Chernov * cmp.c, io.c (word): Don't define if already defined. 2140f5e00e24SAndrey A. Chernov 2141f5e00e24SAndrey A. Chernov * comp.c (main): Use setmode, not open(..., O_BINARY); this gets stdin. 2142f5e00e24SAndrey A. Chernov Use NULL_DEVICE instead of "/dev/null". 2143f5e00e24SAndrey A. Chernov (cmp): Use %lu instead of %ld when it is more likely to be right. 2144f5e00e24SAndrey A. Chernov 2145f5e00e24SAndrey A. Chernov * diff.h (PR_FILE_NAME): Rename to PR_PROGRAM and move to Makefile.in, 2146f5e00e24SAndrey A. Chernov util.c. 2147f5e00e24SAndrey A. Chernov 2148f5e00e24SAndrey A. Chernov * diff3.c (main): Give proper diagnostic if too many labels were given. 2149f5e00e24SAndrey A. Chernov (read_diff): Use SYSTEM_QUOTE_ARG. 2150f5e00e24SAndrey A. Chernov 2151f5e00e24SAndrey A. Chernov * system.h: <string.h>: Include if HAVE_STRING_H, too. 2152f5e00e24SAndrey A. Chernov <ctype.h>: Include here. All includers changed. 2153f5e00e24SAndrey A. Chernov (CTYPE_DOMAIN, ISDIGIT, ISPRINT, ISSPACE, ISUPPER): New macros that 2154f5e00e24SAndrey A. Chernov work around common <ctype.h> problems. 2155f5e00e24SAndrey A. Chernov (O_BINARY): Remove. 2156f5e00e24SAndrey A. Chernov (SYSTEM_QUOTE_ARG): New macros. 2157f5e00e24SAndrey A. Chernov 2158f5e00e24SAndrey A. Chernov * diff.c: Add comment. 2159f5e00e24SAndrey A. Chernov 2160f5e00e24SAndrey A. Chernov * util.c (PR_PROGRAM): Moved here from diff.h. 2161f5e00e24SAndrey A. Chernov (begin_output): Use SYSTEM_QUOTE_ARG. 2162f5e00e24SAndrey A. Chernov 2163f5e00e24SAndrey A. Chernov * io.c (read_files): Set mode to binary before returning 1. 2164f5e00e24SAndrey A. Chernov 2165f5e00e24SAndrey A. Chernov * sdiff.c (TMPDIR_ENV): New macro. 2166f5e00e24SAndrey A. Chernov (DEFAULT_EDITOR_PROGRAM): Renamed from DEFAULT_EDITOR for consistency. 2167f5e00e24SAndrey A. Chernov (expand_name): Change `isdir' to `is_dir' to avoid theoretical ctype 2168f5e00e24SAndrey A. Chernov namespace contamination. 2169f5e00e24SAndrey A. Chernov (main): Use SYSTEM_QUOTE_ARG. 2170f5e00e24SAndrey A. Chernov (private_tempnam): Don't access "/tmp" directly; use PVT_tmpdir. 2171f5e00e24SAndrey A. Chernov 2172f5e00e24SAndrey A. ChernovTue Sep 13 18:46:43 1994 Paul Eggert <eggert@twinsun.com> 2173f5e00e24SAndrey A. Chernov 2174f5e00e24SAndrey A. Chernov * configure.in (AC_FUNC_MEMCHR): Remove. Autoconf didn't adopt this, 2175f5e00e24SAndrey A. Chernov since we need not worry about an old experimental library 2176f5e00e24SAndrey A. Chernov where memchr didn't work. 2177f5e00e24SAndrey A. Chernov (AC_FUNC_MEMCMP): Not needed, since we only test for equality. 2178f5e00e24SAndrey A. Chernov (AC_REPLACE_FUNCS): Add test for memchr. 2179f5e00e24SAndrey A. Chernov (AC_CHECK_FUNCS): Check for memchr, not memcpy, since it'll be cached. 2180f5e00e24SAndrey A. Chernov (AC_CHECK_HEADERS): Add string.h; regex.c uses on some old hosts. 2181f5e00e24SAndrey A. Chernov 2182f5e00e24SAndrey A. Chernov * system.h (memcmp): Define in terms of bcmp. 2183f5e00e24SAndrey A. Chernov Use HAVE_MEMCHR to test for all mem* routines. 2184f5e00e24SAndrey A. Chernov 2185f5e00e24SAndrey A. Chernov * Makefile.in (srcs): Remove memcmp.c. 2186f5e00e24SAndrey A. Chernov We use bcmp if memcmp doesn't work, since we only test for equality. 2187f5e00e24SAndrey A. Chernov 2188f5e00e24SAndrey A. ChernovMon Sep 12 15:52:22 1994 Paul Eggert <eggert@twinsun.com> 2189f5e00e24SAndrey A. Chernov 2190f5e00e24SAndrey A. Chernov * configure.in (AC_CONFIG_HEADER): Rename config.h.in to config.hin. 2191f5e00e24SAndrey A. Chernov (AC_ISC_POSIX, AC_MINIX): Go back to these old names for Autoconf 2. 2192f5e00e24SAndrey A. Chernov (AC_CHECK_HEADERS): Remove now-redundant check for <string.h>. 2193f5e00e24SAndrey A. Chernov (AC_CHECK_FUNCS): Check for strchr. 2194f5e00e24SAndrey A. Chernov (AC_FUNC_MEMCHR, AC_FUNC_MEMCMP, AC_CHECK_FUNCS): Use special-purpose 2195f5e00e24SAndrey A. Chernov macros when suitable. 2196f5e00e24SAndrey A. Chernov * memcmp.c: New file. 2197f5e00e24SAndrey A. Chernov * Makefile.in (CPPFLAGS, DEFS, CFLAGS, LDFLAGS, prefix, exec_prefix): 2198f5e00e24SAndrey A. Chernov Default to autoconf-specified strings. 2199f5e00e24SAndrey A. Chernov (COMPILE): Use the defaults. 2200f5e00e24SAndrey A. Chernov (srcs): Add memcmp.c. 2201f5e00e24SAndrey A. Chernov (distfiles): Rename config.h.in->config.hin, install.sh->install-sh. 2202f5e00e24SAndrey A. Chernov (Makefile, config.h, config.hin, config.status): Rework for 2203f5e00e24SAndrey A. Chernov compatibility with Autoconf 2. 2204f5e00e24SAndrey A. Chernov * io.c (binary_file_p): Assume non-broken memchr. 2205f5e00e24SAndrey A. Chernov * memchr.c: Assume compiler understands void *; otherwise 2206f5e00e24SAndrey A. Chernov we don't match GCC's internal declaration of memchr. 2207f5e00e24SAndrey A. Chernov * system.h: Use more modern autoconf approach to standard C headers. 2208f5e00e24SAndrey A. Chernov * version.c: Include <config.h>, not "config.h". 2209f5e00e24SAndrey A. Chernov 2210f5e00e24SAndrey A. Chernov * diff.c, diff.h (ignore_some_line_changes): 2211f5e00e24SAndrey A. Chernov New variable; replaces `length_varies'. 2212f5e00e24SAndrey A. Chernov (line_end_char): Replace with '\n'; it wasn't being used consistently. 2213f5e00e24SAndrey A. Chernov 2214f5e00e24SAndrey A. Chernov * io.c (find_and_hash_each_line): Fix inconsistencies with -b -w -i and 2215f5e00e24SAndrey A. Chernov incomplete lines. Put incomplete lines into their own bucket. 2216f5e00e24SAndrey A. Chernov This means line_cmp no longer needs line length arguments, 2217f5e00e24SAndrey A. Chernov and equivalence classes' line lengths no longer need to include \n. 2218f5e00e24SAndrey A. Chernov Invoke line_cmp only if ignore_some_line_changes. 2219f5e00e24SAndrey A. Chernov (prepare_text_end): -B no longer ignores missing newlines. 2220f5e00e24SAndrey A. Chernov (read_files): Allocate another bucket for incomplete lines. 2221f5e00e24SAndrey A. Chernov 2222f5e00e24SAndrey A. Chernov * util.c (line_cmp): Now takes just two arguments. No longer 2223f5e00e24SAndrey A. Chernov optimizes for common case of exact equality; the caller does that 2224f5e00e24SAndrey A. Chernov optimization now. The caller is changed accordingly. 2225f5e00e24SAndrey A. Chernov Optimize for the common case of mostly equality. 2226f5e00e24SAndrey A. Chernov Use isupper+tolower instead of islower+toupper, for consistency. 2227f5e00e24SAndrey A. Chernov 2228f5e00e24SAndrey A. Chernov * waitpid.c (waitpid): Fix typo with internal scoping. 2229f5e00e24SAndrey A. Chernov 2230f5e00e24SAndrey A. ChernovThu Sep 8 08:23:15 1994 Paul Eggert <eggert@twinsun.com> 2231f5e00e24SAndrey A. Chernov 2232f5e00e24SAndrey A. Chernov * configure.in: Revamp for Autoconf 2. 2233f5e00e24SAndrey A. Chernov * memchr.c, waitpid.c: New source files for substitute functions. 2234f5e00e24SAndrey A. Chernov * Makefile.in (diff_o, diff3_o, sdiff_o): Add $(LIBOBJS). 2235f5e00e24SAndrey A. Chernov (srcs): Add memchr.c, waitpid.c. 2236f5e00e24SAndrey A. Chernov (distfiles): Add install.sh, memchr.c, waitpid.c, install.sh. 2237f5e00e24SAndrey A. Chernov * system.h: Use Autoconf 2 style HAVE_DIRENT_H etc. macros for dirs. 2238f5e00e24SAndrey A. Chernov * dir.c (dir_sort): Prefer NAMLEN (p) to strlen (p->d_name). 2239f5e00e24SAndrey A. Chernov Change VOID_CLOSEDIR to CLOSEDIR_VOID for Autoconf 2. 2240f5e00e24SAndrey A. Chernov * sdiff.c, util.c (memchr, waitpid): Remove; use new substitutes. 2241f5e00e24SAndrey A. Chernov * diff3.c (read_diff): Use new waitpid substitute. 2242f5e00e24SAndrey A. Chernov 2243f5e00e24SAndrey A. Chernov * cmp.c, diff.c, diff3.c, sdiff.c (check_stdout, try_help): New fns. 2244f5e00e24SAndrey A. Chernov (usage): Just print more detailed usage message; let caller exit. 2245f5e00e24SAndrey A. Chernov * diff.c (option_help): New variable. 2246f5e00e24SAndrey A. Chernov (filetype): Add Posix.1b file types. 2247f5e00e24SAndrey A. Chernov 2248f5e00e24SAndrey A. ChernovFri Sep 2 16:01:49 1994 Paul Eggert <eggert@twinsun.com> 2249f5e00e24SAndrey A. Chernov 2250f5e00e24SAndrey A. Chernov * configure.in: Switch to new autoconf names. Add sys/file.h test. 2251f5e00e24SAndrey A. Chernov * Makefile.in (distclean): Clean config.cache, config.log 2252f5e00e24SAndrey A. Chernov (used by new autoconf). 2253f5e00e24SAndrey A. Chernov 2254f5e00e24SAndrey A. Chernov * diff.c, diff3.c, (main), sdiff.c (trapsigs): If we'll have children, 2255f5e00e24SAndrey A. Chernov make sure SIGCHLD isn't ignored. 2256f5e00e24SAndrey A. Chernov 2257f5e00e24SAndrey A. Chernov * diff3.c (DIFF_CHUNK_SIZE): Removed. Get size from STAT_BLOCKSIZE. 2258f5e00e24SAndrey A. Chernov (INT_STRLEN_BOUND): New macro. 2259f5e00e24SAndrey A. Chernov 2260f5e00e24SAndrey A. Chernov * ifdef.c (format_group, groups_letter_value): 2261f5e00e24SAndrey A. Chernov Use * instead of [] in prototypes. 2262f5e00e24SAndrey A. Chernov 2263f5e00e24SAndrey A. Chernov * system.h: Include <sys/file.h> only if HAVE_SYS_FILE_H. 2264f5e00e24SAndrey A. Chernov (S_IXGRP, S_IXOTH, S_IXUSR): Remove unused macros. 2265f5e00e24SAndrey A. Chernov 2266f5e00e24SAndrey A. Chernov * util.c (begin_output): Check fdopen result. 2267f5e00e24SAndrey A. Chernov 2268f5e00e24SAndrey A. Chernov The following changes simplify porting to non-Posix environments. 2269f5e00e24SAndrey A. Chernov * cmp.c, diff.c, diff3.c, sdiff.c, (main): Call initialize_main first. 2270f5e00e24SAndrey A. Chernov * diff.c (binary_I_O): New variable for --binary option. 2271f5e00e24SAndrey A. Chernov (main, usage, compare_files): Support --binary option. 2272f5e00e24SAndrey A. Chernov (compare_files): Use filename_lastdirchar to find last 2273f5e00e24SAndrey A. Chernov directory char in a file name. 2274f5e00e24SAndrey A. Chernov * cmp.c (main), diff.c (compare_files), dir.c (compare_names, 2275f5e00e24SAndrey A. Chernov diff_dirs): Use filename_cmp to compare file names. 2276f5e00e24SAndrey A. Chernov Use same_file to determine whether two files are the same. 2277f5e00e24SAndrey A. Chernov * context.c (print_context_label): Check whether ctime yields 0. 2278f5e00e24SAndrey A. Chernov * diff3.c (read_diff), sdiff.c (cleanup, main, waitpid), 2279f5e00e24SAndrey A. Chernov util.c (begin_output): Use popen+pclose if !HAVE_FORK. 2280f5e00e24SAndrey A. Chernov * io.c (sip): If HAVE_SETMODE, test for binary files in O_BINARY mode. 2281f5e00e24SAndrey A. Chernov * sdiff.c (ck_fdopen): Function removed. 2282f5e00e24SAndrey A. Chernov (edit): Use system if !HAVE_FORK. 2283f5e00e24SAndrey A. Chernov (execdiff): Now assumes caller has pushed all args, plus trailing 0. 2284f5e00e24SAndrey A. Chernov All callers changed. 2285f5e00e24SAndrey A. Chernov (private_tempnam): Try TMP if TMPDIR isn't defined. 2286f5e00e24SAndrey A. Chernov Fit temporary filenames into 8.3 limit. 2287f5e00e24SAndrey A. Chernov * system.h (STAT_BLOCKSIZE): Don't define if already defined. 2288f5e00e24SAndrey A. Chernov (min, max): Undef if already defined. 2289f5e00e24SAndrey A. Chernov (filename_cmp, filename_lastdirchar, HAVE_FORK, HAVE_SETMODE, 229018fd37a7SXin LI initialize_main, O_BINARY, same_file): New macros. 2291f5e00e24SAndrey A. Chernov 2292f5e00e24SAndrey A. ChernovFri Jun 17 11:23:53 1994 David J. MacKenzie (djm@geech.gnu.ai.mit.edu) 2293f5e00e24SAndrey A. Chernov 2294f5e00e24SAndrey A. Chernov * Makefile.in (info, dvi, diff.dvi): New targets. 2295f5e00e24SAndrey A. Chernov (clean): Remove TeX output files. 2296f5e00e24SAndrey A. Chernov 2297f5e00e24SAndrey A. ChernovFri Jun 17 05:37:52 1994 Paul Eggert (eggert@twinsun.com) 2298f5e00e24SAndrey A. Chernov 2299f5e00e24SAndrey A. Chernov * cmp.c, io.c (word): Change from typedef to #define, to avoid 2300f5e00e24SAndrey A. Chernov collision with Unicos 8.0 <sys/types.h>, which also typedefs `word'. 2301f5e00e24SAndrey A. Chernov 2302f5e00e24SAndrey A. ChernovThu Apr 15 00:53:01 1994 Paul Eggert (eggert@twinsun.com) 2303f5e00e24SAndrey A. Chernov 2304f5e00e24SAndrey A. Chernov * diff3.c (scan_diff_line), util.c (print_number_range): Don't 2305f5e00e24SAndrey A. Chernov rely on promotion to make the old-style parameter type agree 2306f5e00e24SAndrey A. Chernov with the prototype parameter type; this doesn't work on 2307f5e00e24SAndrey A. Chernov Apollos running bsd4.3. 2308f5e00e24SAndrey A. Chernov 2309f5e00e24SAndrey A. ChernovMon Jan 3 02:05:51 1994 Paul Eggert (eggert@twinsun.com) 2310f5e00e24SAndrey A. Chernov 2311f5e00e24SAndrey A. Chernov * Makefile.in (LDFLAGS): Remove -g. Change all link commands 2312f5e00e24SAndrey A. Chernov to use both $(CFLAGS) and $(LDFLAGS). 2313f5e00e24SAndrey A. Chernov 2314f5e00e24SAndrey A. ChernovMon Dec 13 12:23:27 1993 Paul Eggert (eggert@twinsun.com) 2315f5e00e24SAndrey A. Chernov 2316f5e00e24SAndrey A. Chernov * system.h: Don't assume dirent.h exists just because 2317f5e00e24SAndrey A. Chernov _POSIX_VERSION is defined. 2318f5e00e24SAndrey A. Chernov 2319f5e00e24SAndrey A. ChernovFri Dec 3 18:39:39 1993 Paul Eggert (eggert@twinsun.com) 2320f5e00e24SAndrey A. Chernov 2321f5e00e24SAndrey A. Chernov * diff.c (main): allow -pu. 2322f5e00e24SAndrey A. Chernov 2323f5e00e24SAndrey A. ChernovTue Nov 23 03:51:08 1993 Paul Eggert (eggert@twinsun.com) 2324f5e00e24SAndrey A. Chernov 2325f5e00e24SAndrey A. Chernov * Makefile.in (distclean): Remove config.h. 2326f5e00e24SAndrey A. Chernov 2327f5e00e24SAndrey A. ChernovWed Nov 10 00:28:27 1993 Paul Eggert (eggert@twinsun.com) 2328f5e00e24SAndrey A. Chernov 2329f5e00e24SAndrey A. Chernov * Version 2.6 released. 2330f5e00e24SAndrey A. Chernov 2331f5e00e24SAndrey A. Chernov * analyze.c (too_expensive): New variable, for heuristic to 2332f5e00e24SAndrey A. Chernov limit the worst-case cost to O(N**1.5 log N) at the price of 2333f5e00e24SAndrey A. Chernov producing suboptimal output for large inputs with many differences. 2334f5e00e24SAndrey A. Chernov (diff_2_files): Initialize it. 2335f5e00e24SAndrey A. Chernov (struct partition): New type. 2336f5e00e24SAndrey A. Chernov (SNAKE_LIMIT): New macro; merely documents already-used number 20. 2337f5e00e24SAndrey A. Chernov (diag): New `minimal' arg; all callers changed. Put results into 2338f5e00e24SAndrey A. Chernov struct partition. Apply `too_expensive' heuristic. Tune. 2339f5e00e24SAndrey A. Chernov (compareseq): New `minimal' arg; all callers changed. Tune. 2340f5e00e24SAndrey A. Chernov (shift_boundaries): Improve heuristic to also coalesce adjacent runs 2341f5e00e24SAndrey A. Chernov of changes more often. 2342f5e00e24SAndrey A. Chernov 2343f5e00e24SAndrey A. Chernov * diff.c (long_options, main, usage): Add `--help'. 2344f5e00e24SAndrey A. Chernov (main): Send version number to stdout, not stderr. 2345f5e00e24SAndrey A. Chernov (usage): Send usage to stdout, not stderr. 2346f5e00e24SAndrey A. Chernov (compare_files): Initialize `inf' properly. 2347f5e00e24SAndrey A. Chernov 2348f5e00e24SAndrey A. Chernov * io.c (word): Change to `int'; it makes a big difference on x86. 2349f5e00e24SAndrey A. Chernov (sip, slurp): Put off allocating room to hold the whole file until we 2350f5e00e24SAndrey A. Chernov have to read the whole file. This wins if the file turns out 2351f5e00e24SAndrey A. Chernov to be binary. 2352f5e00e24SAndrey A. Chernov 2353f5e00e24SAndrey A. Chernov * util.c (xmalloc, xrealloc): "virtual memory" -> "memory" 2354f5e00e24SAndrey A. Chernov (primes): Omit large primes if INT_MAX is small. 2355f5e00e24SAndrey A. Chernov 2356f5e00e24SAndrey A. Chernov * sdiff.c (usage): Send usage to stdout, not stderr. 2357f5e00e24SAndrey A. Chernov (long_options, main, usage): Add `--help'. 2358f5e00e24SAndrey A. Chernov (main): Send version number to stdout, not stderr. Exit afterwards. 2359f5e00e24SAndrey A. Chernov 2360f5e00e24SAndrey A. Chernov * diff3.c (usage): Send usage to stdout, not stderr. 2361f5e00e24SAndrey A. Chernov (long_options, main, usage): Add `--help'. 2362f5e00e24SAndrey A. Chernov (read_diff): Detect integer overflow in buffer size calculations. 2363f5e00e24SAndrey A. Chernov 2364f5e00e24SAndrey A. Chernov * cmp.c (word): New type. All uses of `long' for 2365f5e00e24SAndrey A. Chernov word-at-a-time comparisons changed to `word'. 2366f5e00e24SAndrey A. Chernov (long_options, main, usage): Add `--help'. 2367f5e00e24SAndrey A. Chernov (usage): Send usage to stdout, not stderr. 2368f5e00e24SAndrey A. Chernov (main): Add `-v'. Send version number to stdout, not stderr. 2369f5e00e24SAndrey A. Chernov 2370f5e00e24SAndrey A. Chernov * configure.in (AC_HAVE_HEADERS): Add unistd.h; remove AC_UNISTD_H. 2371f5e00e24SAndrey A. Chernov 2372f5e00e24SAndrey A. ChernovMon Sep 27 07:20:24 1993 Paul Eggert (eggert@twinsun.com) 2373f5e00e24SAndrey A. Chernov 2374f5e00e24SAndrey A. Chernov * diff.c (add_exclude_file): Cast memchr to (char *) 2375f5e00e24SAndrey A. Chernov to suppress bogus warnings on some nonstandard hosts. 2376f5e00e24SAndrey A. Chernov 2377f5e00e24SAndrey A. Chernov * Makefile.in (cmp): Add version.o. 2378f5e00e24SAndrey A. Chernov 2379f5e00e24SAndrey A. Chernov * analyze.c (diff_2_files): Work around memcmp bug with size=0. 2380f5e00e24SAndrey A. Chernov 2381f5e00e24SAndrey A. Chernov * cmp.c (main, usage, version_string): Add --version option. 2382f5e00e24SAndrey A. Chernov 2383f5e00e24SAndrey A. Chernov * system.h (malloc, realloc): Declare only if !HAVE_STDLIB_H. 2384f5e00e24SAndrey A. Chernov (memchr): Declare only if !HAVE_MEMCHR. These changes are 2385f5e00e24SAndrey A. Chernov needed to keep some nonstandard hosts happy. 2386f5e00e24SAndrey A. Chernov 2387f5e00e24SAndrey A. Chernov * util.c (memchr): Make first arg char const * 2388f5e00e24SAndrey A. Chernov to match standard. 2389f5e00e24SAndrey A. Chernov (xmalloc, xrealloc): Cast malloc, realloc 2390f5e00e24SAndrey A. Chernov to (VOID *) to suppress bogus warnings on some nonstandard hosts. 2391f5e00e24SAndrey A. Chernov 2392f5e00e24SAndrey A. Chernov * diff3.c (xmalloc, xrealloc): Cast malloc, realloc 2393f5e00e24SAndrey A. Chernov to (VOID *) to suppress bogus warnings on some nonstandard hosts. 2394f5e00e24SAndrey A. Chernov 2395f5e00e24SAndrey A. Chernov * sdiff.c (xmalloc, xrealloc): Cast malloc, realloc 2396f5e00e24SAndrey A. Chernov to (VOID *) to suppress bogus warnings on some nonstandard hosts. 2397f5e00e24SAndrey A. Chernov (lf_copy, lf_skip, lf_snarf): Cast memchr to (char *) 2398f5e00e24SAndrey A. Chernov to suppress bogus warnings on some nonstandard hosts. 2399f5e00e24SAndrey A. Chernov (memchr): Make first arg char const * 2400f5e00e24SAndrey A. Chernov to match standard. 2401f5e00e24SAndrey A. Chernov 2402f5e00e24SAndrey A. ChernovMon Sep 27 00:23:37 1993 Paul Eggert (eggert@twinsun.com) 2403f5e00e24SAndrey A. Chernov 2404f5e00e24SAndrey A. Chernov * Version 2.5 released. 2405f5e00e24SAndrey A. Chernov 2406f5e00e24SAndrey A. Chernov * analyze.c (diff_2_files): Work around memcmp bug with size=0. 2407f5e00e24SAndrey A. Chernov 2408f5e00e24SAndrey A. Chernov * cmp.c (main, usage, version_string): Add --version option. 2409f5e00e24SAndrey A. Chernov * Makefile.in (cmp): Add version.o. 2410f5e00e24SAndrey A. Chernov 2411f5e00e24SAndrey A. Chernov * diff.c (add_exclude_file): Cast memchr to (char *) 2412f5e00e24SAndrey A. Chernov to suppress bogus warnings on some nonstandard hosts. 2413f5e00e24SAndrey A. Chernov * sdiff.c (lf_copy, lf_skip, lf_snarf): Likewise. 2414f5e00e24SAndrey A. Chernov 2415f5e00e24SAndrey A. Chernov * diff3.c, sdiff.c, util.c (xmalloc, xrealloc): Cast malloc, realloc 2416f5e00e24SAndrey A. Chernov to (VOID *) to suppress bogus warnings on some nonstandard hosts. 2417f5e00e24SAndrey A. Chernov 2418f5e00e24SAndrey A. Chernov * sdiff.c, util.c (memchr): Make first arg char const * 2419f5e00e24SAndrey A. Chernov to match standard. 2420f5e00e24SAndrey A. Chernov 2421f5e00e24SAndrey A. Chernov * system.h (malloc, realloc): Declare only if !HAVE_STDLIB_H. 2422f5e00e24SAndrey A. Chernov (memchr): Declare only if !HAVE_MEMCHR. These changes are 2423f5e00e24SAndrey A. Chernov needed to keep some nonstandard hosts happy. 2424f5e00e24SAndrey A. Chernov 2425f5e00e24SAndrey A. Chernov * xmalloc.c: Include <sys/types.h> always; some nonstandard hosts 2426f5e00e24SAndrey A. Chernov need it for size_t even if STDC_HEADERS. 2427f5e00e24SAndrey A. Chernov 2428f5e00e24SAndrey A. ChernovSat Sep 18 01:33:07 1993 Paul Eggert (eggert@twinsun.com) 2429f5e00e24SAndrey A. Chernov 2430f5e00e24SAndrey A. Chernov * configure.in (AC_STAT_MACROS_BROKEN): Add. 2431f5e00e24SAndrey A. Chernov * system.h (S_IS{BLK,CHR,DIR,FIFO,REG,SOCK}): Fix defns if 2432f5e00e24SAndrey A. Chernov STAT_MACROS_BROKEN. 2433f5e00e24SAndrey A. Chernov 2434f5e00e24SAndrey A. Chernov * Makefile.in (diff3, sdiff, cmp): Do not link $(ALLOCA). 2435f5e00e24SAndrey A. Chernov 2436f5e00e24SAndrey A. Chernov * analyze.c (discard_confusing_lines): Make defn static, like decl. 2437f5e00e24SAndrey A. Chernov * sdiff.c (xmalloc): Likewise. 2438f5e00e24SAndrey A. Chernov 2439f5e00e24SAndrey A. Chernov * ifdef.c (format_group): Ensure isdigit argument isn't < 0. 2440f5e00e24SAndrey A. Chernov 2441f5e00e24SAndrey A. Chernov * side.c (print_half_line): Use isprint, since some hosts lack isgraph. 2442f5e00e24SAndrey A. Chernov * util.c (output_1_line): Likewise. Ensure its argument isn't < 0. 2443f5e00e24SAndrey A. Chernov (xmalloc, xrealloc): Remove needless casts. 2444f5e00e24SAndrey A. Chernov 2445f5e00e24SAndrey A. Chernov * system.h (volatile, const): 2446f5e00e24SAndrey A. Chernov Define these before including any system headers, 2447f5e00e24SAndrey A. Chernov so that they're used consistently in all system includes. 2448f5e00e24SAndrey A. Chernov (getenv, malloc, realloc): Declare even if HAVE_STDLIB_H, since some 2449f5e00e24SAndrey A. Chernov <stdlib.h>s don't declare them. 2450f5e00e24SAndrey A. Chernov (memchr): Likewise for <string.h>. 2451f5e00e24SAndrey A. Chernov 2452f5e00e24SAndrey A. Chernov * cmp.c, diff3.c, diff.h, sdiff.c: Include "system.h" first. 2453f5e00e24SAndrey A. Chernov * diff.c: Remove redundant "system.h" inclusion. 2454f5e00e24SAndrey A. Chernov 2455f5e00e24SAndrey A. Chernov * diff3.c (xmalloc): Now static. 2456f5e00e24SAndrey A. Chernov (xmalloc, realloc): Remove needless casts. 2457f5e00e24SAndrey A. Chernov (READNUM): Ensure isdigit argument isn't negative. 2458f5e00e24SAndrey A. Chernov 2459f5e00e24SAndrey A. ChernovWed Sep 14 07:14:15 1993 Paul Eggert (eggert@twinsun.com) 2460f5e00e24SAndrey A. Chernov 2461f5e00e24SAndrey A. Chernov * Version 2.4 released. 2462f5e00e24SAndrey A. Chernov 2463f5e00e24SAndrey A. Chernov * ifdef.c (scan_char_literal): New function, for new %c'x' and 2464f5e00e24SAndrey A. Chernov %c'\ooo' format specs. 2465f5e00e24SAndrey A. Chernov (format_group, print_ifdef_lines): Use it. Remove %0 format spec. 2466f5e00e24SAndrey A. Chernov 2467f5e00e24SAndrey A. Chernov * cmp.c (cmp): Don't try to read past end of file; this doesn't 2468f5e00e24SAndrey A. Chernov work on ttys. 2469f5e00e24SAndrey A. Chernov 2470f5e00e24SAndrey A. Chernov * system.h, version.c: #include <config.h>, not "config.h", to allow 2471f5e00e24SAndrey A. Chernov configuring in a separate directory when the source directory has 2472f5e00e24SAndrey A. Chernov already been configured. 2473f5e00e24SAndrey A. Chernov * Makefile.in (COMPILE): New defn, with proper -I options so that 2474f5e00e24SAndrey A. Chernov `#include <config.h>' works. 2475f5e00e24SAndrey A. Chernov (.c.o, diff3.o, sdiff.o): Use it. 2476f5e00e24SAndrey A. Chernov 2477f5e00e24SAndrey A. ChernovMon Sep 13 06:45:43 1993 Paul Eggert (eggert@twinsun.com) 2478f5e00e24SAndrey A. Chernov 2479f5e00e24SAndrey A. Chernov * diff.c (main, longopts): Add --line-format=FORMAT option. 2480f5e00e24SAndrey A. Chernov (specify_format): Args no longer const pointers. All callers changed. 2481f5e00e24SAndrey A. Chernov 2482f5e00e24SAndrey A. Chernov * ifdef.c: Add support for %?c, %(A=B?T:E), PRINTF_SPECn formats. 2483f5e00e24SAndrey A. Chernov (struct group): New struct. 2484f5e00e24SAndrey A. Chernov (print_ifdef_lines): Use it to simplify argument passing. 2485f5e00e24SAndrey A. Chernov Remove the convention that last arg -1 signifies that the lines 2486f5e00e24SAndrey A. Chernov from file 2 are the same as the lines from file 1; this 2487f5e00e24SAndrey A. Chernov convention no longer works, now that line numbers might be 2488f5e00e24SAndrey A. Chernov printed out, since the line numbers may differ. 2489f5e00e24SAndrey A. Chernov Add first FILE * argument to output to. All callers changed. 2490f5e00e24SAndrey A. Chernov Use a faster test for the single-fwrite optimization. 2491f5e00e24SAndrey A. Chernov (format_group, scan_printf_spec, groups_letter_value): New functions. 2492f5e00e24SAndrey A. Chernov 2493f5e00e24SAndrey A. Chernov * diff.h (group_format, line_format): No longer const pointers. 2494f5e00e24SAndrey A. Chernov (format_ifdef): 1st arg is no longer const pointer. 2495f5e00e24SAndrey A. Chernov 2496f5e00e24SAndrey A. Chernov * configure.in: Configure HAVE_LIMITS_H, HAVE_STDLIB_H. 2497f5e00e24SAndrey A. Chernov * system.h <limits.h>, <stdlib.h>, <string.h>: 2498f5e00e24SAndrey A. Chernov Include only if HAVE_LIMITS_H etc. 2499f5e00e24SAndrey A. Chernov 2500f5e00e24SAndrey A. Chernov * system.h (memcmp, memcpy, strchr, strrchr, struct dirent): Prefer 2501f5e00e24SAndrey A. Chernov these standard names to the traditional names (bcmp, bcpy, index, 2502f5e00e24SAndrey A. Chernov rindex, struct direct). All callers changed. 2503f5e00e24SAndrey A. Chernov 2504f5e00e24SAndrey A. Chernov * system.h (PARAMS, VOID): 2505f5e00e24SAndrey A. Chernov Define earlier so that malloc decl can use VOID. 2506f5e00e24SAndrey A. Chernov (STAT_BLOCKSIZE): Simplify ersatz defn; just use 8K. 2507f5e00e24SAndrey A. Chernov 2508f5e00e24SAndrey A. ChernovFri Sep 3 00:21:02 1993 Paul Eggert (eggert@twinsun.com) 2509f5e00e24SAndrey A. Chernov 2510f5e00e24SAndrey A. Chernov * diff.c (compare_files): Two files with the same name must be 2511f5e00e24SAndrey A. Chernov the same file; avoid a needless `stat' in that case. 2512f5e00e24SAndrey A. Chernov 2513f5e00e24SAndrey A. ChernovFri Aug 27 06:59:03 1993 Paul Eggert (eggert@twinsun.com) 2514f5e00e24SAndrey A. Chernov 2515f5e00e24SAndrey A. Chernov * Pervasive changes for portability to 64-bit hosts: 2516f5e00e24SAndrey A. Chernov Add prototypes to function declarations. 2517f5e00e24SAndrey A. Chernov Use size_t, not int, when needed. 2518f5e00e24SAndrey A. Chernov 2519f5e00e24SAndrey A. Chernov * Other pervasive changes: 2520f5e00e24SAndrey A. Chernov Use `const' more often. 2521f5e00e24SAndrey A. Chernov Use STD{IN,OUT,ERR}_FILENO instead of [012]. 2522f5e00e24SAndrey A. Chernov Use 0, not NULL, for portability to broken hosts. 2523f5e00e24SAndrey A. Chernov 2524f5e00e24SAndrey A. Chernov * Makefile.in: (srcs, objs, distfiles, cmp): New files cmpbuf.[ch]. 2525f5e00e24SAndrey A. Chernov (distfiles): New files config.h.in, mkinstalldirs. 2526f5e00e24SAndrey A. Chernov (.c.o): Add -DHAVE_CONFIG_H. 2527f5e00e24SAndrey A. Chernov 2528f5e00e24SAndrey A. Chernov * analyze.c: (diag): Pacify `gcc -Wall' with a useless assignment. 2529f5e00e24SAndrey A. Chernov (diff_2_files): Use l.c.m., not max, of files' buffer sizes. 2530f5e00e24SAndrey A. Chernov 2531f5e00e24SAndrey A. Chernov * cmp.c: Make globals static when possible. 2532f5e00e24SAndrey A. Chernov 2533f5e00e24SAndrey A. Chernov (file): Now a 2-element array; replaces `file1' and `file2'. 2534f5e00e24SAndrey A. Chernov (file_desc, buffer): Likewise, for file[12]_desc and buf[12]. 2535f5e00e24SAndrey A. Chernov (main): Likewise, for stat_buf[12]. Index these variables with `i'. 2536f5e00e24SAndrey A. Chernov 2537f5e00e24SAndrey A. Chernov (ignore_initial): New var. 2538f5e00e24SAndrey A. Chernov (long_options): Now const. Add `--ignore-initial'. 2539f5e00e24SAndrey A. Chernov (usage): Sort options and add `--ignore-initial'. 2540f5e00e24SAndrey A. Chernov (main, cmp): Add `--ignore-initial' support. 2541f5e00e24SAndrey A. Chernov 2542f5e00e24SAndrey A. Chernov (main): `cmp - -' now succeeds. 2543f5e00e24SAndrey A. Chernov When comparing standard input to a file, and using a shortcut (e.g. 2544f5e00e24SAndrey A. Chernov looking at file sizes or inode numbers), take the lseek offset into 2545f5e00e24SAndrey A. Chernov account before deciding whether the files are identical. 2546f5e00e24SAndrey A. Chernov Avoid mentioning `dev_t', `ino_t' for portability to nonstandard hosts. 2547f5e00e24SAndrey A. Chernov Use l.c.m. of files' buffer sizes, not 8 * 1024. 2548f5e00e24SAndrey A. Chernov ferror (stdout) does not imply errno has a useful value. 2549f5e00e24SAndrey A. Chernov If 2nd file is "-", treat it first, in case stdin is closed. 2550f5e00e24SAndrey A. Chernov 2551f5e00e24SAndrey A. Chernov (cmp): Always compute `char_number', `smaller' for speed and simplicity. 2552f5e00e24SAndrey A. Chernov Say `cmp: EOF on input', not `/usr/gnu/bin/cmp: EOF on input', 2553f5e00e24SAndrey A. Chernov as per Posix.2. 2554f5e00e24SAndrey A. Chernov 2555f5e00e24SAndrey A. Chernov (block_compare_and_count): Increment line_number argument. 2556f5e00e24SAndrey A. Chernov Remove end_char argument; it's always '\n'. All callers changed. 2557f5e00e24SAndrey A. Chernov Do not assume sizeof(long) == 4; this isn't true on some 64-bit hosts. 2558f5e00e24SAndrey A. Chernov (block_compare): Minimize differences with block_compare_and_count. 2559f5e00e24SAndrey A. Chernov 2560f5e00e24SAndrey A. Chernov (block_read): Coalesce `bp += nread's. 2561f5e00e24SAndrey A. Chernov 2562f5e00e24SAndrey A. Chernov (printc): Remove `FILE *' arg; output to stdout. All callers changed. 2563f5e00e24SAndrey A. Chernov 2564f5e00e24SAndrey A. Chernov * configure.in: Configure HAVE_SIGACTION, RETSIGTYPE, HAVE_VPRINTF. 2565f5e00e24SAndrey A. Chernov Configure into config.h. 2566f5e00e24SAndrey A. Chernov 2567f5e00e24SAndrey A. Chernov * context.c (print_context_label): 2568f5e00e24SAndrey A. Chernov Standard input's st_mtime is no longer a special case 2569f5e00e24SAndrey A. Chernov here, since `compare_files' now sets it to the current time. 2570f5e00e24SAndrey A. Chernov 2571f5e00e24SAndrey A. Chernov * diff.c (usage): Sort options. 2572f5e00e24SAndrey A. Chernov (filetype): New function. 2573f5e00e24SAndrey A. Chernov (compare_files): Set stdin's st_mtime to be the current time. 2574f5e00e24SAndrey A. Chernov Leave its name "-" instead of changing it to "Standard Input"; 2575f5e00e24SAndrey A. Chernov to test whether a file is stdin, we must compare its name to "-" instead 2576f5e00e24SAndrey A. Chernov of its desc to 0, since if it's closed other file descs may be 0. 2577f5e00e24SAndrey A. Chernov When comparing standard input to a file, and using a shortcut (e.g. 2578f5e00e24SAndrey A. Chernov looking at file sizes or inode numbers), take the lseek offset into 2579f5e00e24SAndrey A. Chernov account before deciding whether the files are identical. 2580f5e00e24SAndrey A. Chernov Pretend that nonexistent files have the same filetype as existing files. 2581f5e00e24SAndrey A. Chernov Rename `errorcount' to `failed', since it's boolean. 2582f5e00e24SAndrey A. Chernov In directory comparisons, if a file is neither a regular file nor a 2583f5e00e24SAndrey A. Chernov directory, just print its type and the other file's type. 2584f5e00e24SAndrey A. Chernov 2585f5e00e24SAndrey A. Chernov * diff.h (Is_space, textchar): Remove. 2586f5e00e24SAndrey A. Chernov (struct msg, msg_chain, msg_chain_end): Move to util.c. 2587f5e00e24SAndrey A. Chernov (VOID): Move to system.h. 2588f5e00e24SAndrey A. Chernov (line_cmp, version_string, change_letter, print_number_range, 2589f5e00e24SAndrey A. Chernov find_change): New decls. 2590f5e00e24SAndrey A. Chernov 2591f5e00e24SAndrey A. Chernov * diff.texi: 2592f5e00e24SAndrey A. Chernov whitespace -> white space. It now stands for whatever isspace yields. 2593f5e00e24SAndrey A. Chernov Add --ignore-initial. 2594f5e00e24SAndrey A. Chernov 2595f5e00e24SAndrey A. Chernov * diff3.c (VOID): Move to system.h. 2596f5e00e24SAndrey A. Chernov (version_string): Now char[]. 2597f5e00e24SAndrey A. Chernov (usage): Sort options. 2598f5e00e24SAndrey A. Chernov (process_diff): Pacify `gcc -Wall' with a useless assignment. 2599f5e00e24SAndrey A. Chernov (read_diff): pid is of type pid_t, not int. Use waitpid if available. 2600f5e00e24SAndrey A. Chernov (output_diff3): Simplify test for `\ No newline at end of file' message. 2601f5e00e24SAndrey A. Chernov 2602f5e00e24SAndrey A. Chernov * dir.c (struct dirdata): Rename `files' to `names' to avoid confusion 2603f5e00e24SAndrey A. Chernov with external struct file_data `files'. 2604f5e00e24SAndrey A. Chernov 2605f5e00e24SAndrey A. Chernov * io.c (line_cmp): Move declaration to diff.h. 2606f5e00e24SAndrey A. Chernov (textchar): Remove. 2607f5e00e24SAndrey A. Chernov (find_and_hash_each_line): Use locale's definition of white space 2608f5e00e24SAndrey A. Chernov instead of using one hardwired defn for -b and another for -w. 2609f5e00e24SAndrey A. Chernov 2610f5e00e24SAndrey A. Chernov * normal.c (change_letter, print_number_range, find_change): 2611f5e00e24SAndrey A. Chernov Move decls to diff.h. 2612f5e00e24SAndrey A. Chernov (print_normal_hunk): Now static. 2613f5e00e24SAndrey A. Chernov 2614f5e00e24SAndrey A. Chernov * sdiff.c (SEEK_SET): Move to system.h. 2615f5e00e24SAndrey A. Chernov (version_string): Now char[], not char*. 2616f5e00e24SAndrey A. Chernov (private_tempnam): Remove hardcoded limit on temporary file names. 2617f5e00e24SAndrey A. Chernov (exiterr, perror_fatal, main): When exiting because of a signal, 2618f5e00e24SAndrey A. Chernov exit with that signal's status. 2619f5e00e24SAndrey A. Chernov (lf_refill, main, skip_white, edit, interact): Check for signal. 2620f5e00e24SAndrey A. Chernov (ignore_SIGINT): Renamed from `ignore_signals'. 2621f5e00e24SAndrey A. Chernov (NUM_SIGS, initial_handler): New macros. 2622f5e00e24SAndrey A. Chernov (initial_action, signal_received, sigs_trapped): New vars. 2623f5e00e24SAndrey A. Chernov (catchsig, trapsigs): Use sigaction if possible, since this closes the 2624f5e00e24SAndrey A. Chernov windows of vulnerability that `signal' has. Use RETSIGTYPE not void. 2625f5e00e24SAndrey A. Chernov When a signal comes in, just set a global variable; this is safer. 2626f5e00e24SAndrey A. Chernov (checksigs, untrapsig): New functions. 2627f5e00e24SAndrey A. Chernov (edit): Pacify `gcc -Wall' with a useless assignment. 2628f5e00e24SAndrey A. Chernov Respond to each empty line with help, not to every other empty line. 2629f5e00e24SAndrey A. Chernov (private_tempnam): Remove hardcoded limit on temporary file name length. 2630f5e00e24SAndrey A. Chernov Don't assume sizeof (pid_t) <= sizeof (int). 2631f5e00e24SAndrey A. Chernov 2632f5e00e24SAndrey A. Chernov * system.h: (S_IXOTH, S_IXGRP, S_IXUSR, 2633f5e00e24SAndrey A. Chernov SEEK_SET, SEEK_CUR, 2634f5e00e24SAndrey A. Chernov STDIN_FILENO, STDOUT_FILENO, STDERR_FILENO): 2635f5e00e24SAndrey A. Chernov New macros, if system doesn't define them. 2636f5e00e24SAndrey A. Chernov (volatile): Don't define if already defined. 2637f5e00e24SAndrey A. Chernov (PARAMS): New macro. 2638f5e00e24SAndrey A. Chernov (VOID): Move here from diff.h. 2639f5e00e24SAndrey A. Chernov 2640f5e00e24SAndrey A. Chernov * util.c (struct msg, msg_chain, msg_chain_end): Moved here from diff.h. 2641f5e00e24SAndrey A. Chernov (message5): New function. 2642f5e00e24SAndrey A. Chernov (pr_pid): New var. 2643f5e00e24SAndrey A. Chernov (begin_output): Allocate `name' more precisely. 2644f5e00e24SAndrey A. Chernov Put child pid into pr_pid, so that we can wait for it later. 2645f5e00e24SAndrey A. Chernov Don't check execl's return value, since any return must be an error. 2646f5e00e24SAndrey A. Chernov (finish_output): Detect and report output errors. 2647f5e00e24SAndrey A. Chernov Use waitpid if available. Check pr exit status. 2648f5e00e24SAndrey A. Chernov (line_cmp): Use locale's definition of white space 2649f5e00e24SAndrey A. Chernov instead of using one hardwired defn for -b and another for -w. 2650f5e00e24SAndrey A. Chernov (analyze_cmp): Avoid double negation with `! nontrivial'. 2651f5e00e24SAndrey A. Chernov Pacify `gcc -Wall' be rewriting for-loop into do-while-loop. 2652f5e00e24SAndrey A. Chernov (dir_file_pathname): New function. 2653f5e00e24SAndrey A. Chernov 2654f5e00e24SAndrey A. Chernov * version.c (version_string): Now char[], not char*. 2655f5e00e24SAndrey A. Chernov 2656f5e00e24SAndrey A. ChernovThu Jul 29 20:44:30 1993 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu) 2657f5e00e24SAndrey A. Chernov 2658f5e00e24SAndrey A. Chernov * Makefile.in (config.status): Run config.status --recheck, not 2659f5e00e24SAndrey A. Chernov configure, to get the right args passed. 2660f5e00e24SAndrey A. Chernov 2661f5e00e24SAndrey A. ChernovThu Jul 22 10:46:30 1993 Paul Eggert (eggert@twinsun.com) 2662f5e00e24SAndrey A. Chernov 2663f5e00e24SAndrey A. Chernov * Makefile.in (dist): Replace `if [ ! TEST ]; then ACTION; fi' 2664f5e00e24SAndrey A. Chernov with `[ TEST ] || ACTION || exit' so that the containing for-loop exits 2665f5e00e24SAndrey A. Chernov with proper status for `make'. 2666f5e00e24SAndrey A. Chernov 2667f5e00e24SAndrey A. ChernovThu Jul 8 19:47:22 1993 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu) 2668f5e00e24SAndrey A. Chernov 2669f5e00e24SAndrey A. Chernov * Makefile.in (installdirs): New target. 2670f5e00e24SAndrey A. Chernov (install): Use it. 2671f5e00e24SAndrey A. Chernov (Makefile, config.status, configure): New targets. 2672f5e00e24SAndrey A. Chernov 2673f5e00e24SAndrey A. ChernovSat Jun 5 23:10:40 1993 Paul Eggert (eggert@twinsun.com) 2674f5e00e24SAndrey A. Chernov 2675f5e00e24SAndrey A. Chernov * Makefile.in (dist): Switch from .z to .gz. 2676f5e00e24SAndrey A. Chernov 2677f5e00e24SAndrey A. ChernovWed May 26 17:16:02 1993 Paul Eggert (eggert@twinsun.com) 2678f5e00e24SAndrey A. Chernov 2679f5e00e24SAndrey A. Chernov * diff.c (main): Cast args to compare_files, for traditional C. 268018fd37a7SXin LI * side.c (print_sdiff_common_lines, print_sdiff_hunk): Likewise. 2681f5e00e24SAndrey A. Chernov * analyze.c, diff3.c, sdiff.c, util.c: Don't assume NULL is defined 2682f5e00e24SAndrey A. Chernov properly. 2683f5e00e24SAndrey A. Chernov 2684f5e00e24SAndrey A. ChernovTue May 25 14:54:05 1993 Paul Eggert (eggert@twinsun.com) 2685f5e00e24SAndrey A. Chernov 2686f5e00e24SAndrey A. Chernov * analyze.c (diff_2_files): With -q, do not report that files differ 2687f5e00e24SAndrey A. Chernov if all their differences are ignored. 2688f5e00e24SAndrey A. Chernov (briefly_report): New function. 2689f5e00e24SAndrey A. Chernov * diff.h (ignore_some_changes): New variable. 2690f5e00e24SAndrey A. Chernov * diff.c (compare_files): Don't use the file size shortcut if 2691f5e00e24SAndrey A. Chernov ignore_some_changes is nonzero, since the file size may differ 2692f5e00e24SAndrey A. Chernov merely due to ignored changes. 2693f5e00e24SAndrey A. Chernov (main): Set ignore_some_changes if we might ignore some changes. 2694f5e00e24SAndrey A. Chernov Remove unsystematic assignment of 0 to static vars. 2695f5e00e24SAndrey A. Chernov * io.c (read_files): New argument PRETEND_BINARY says whether to 2696f5e00e24SAndrey A. Chernov pretend the files are binary. 2697f5e00e24SAndrey A. Chernov 2698f5e00e24SAndrey A. Chernov * diff3.c (tab_align_flag): New variable, for new -T option. 2699f5e00e24SAndrey A. Chernov (main, usage, output_diff3): Add support for -T. 2700f5e00e24SAndrey A. Chernov 2701f5e00e24SAndrey A. ChernovSun May 23 15:25:29 1993 Richard Stallman (rms@mole.gnu.ai.mit.edu) 2702f5e00e24SAndrey A. Chernov 2703f5e00e24SAndrey A. Chernov * dir.c (dir_sort): Always init `data' to avoid GCC warning. 2704f5e00e24SAndrey A. Chernov 2705f5e00e24SAndrey A. ChernovSat May 22 15:35:02 1993 Paul Eggert (eggert@twinsun.com) 2706f5e00e24SAndrey A. Chernov 2707f5e00e24SAndrey A. Chernov * Makefile.in (dist): Change name of package from diff to diffutils. 2708f5e00e24SAndrey A. Chernov Don't bother to build .Z dist; .z suffices. 2709f5e00e24SAndrey A. Chernov 2710f5e00e24SAndrey A. ChernovFri May 21 16:35:22 1993 Paul Eggert (eggert@twinsun.com) 2711f5e00e24SAndrey A. Chernov 2712f5e00e24SAndrey A. Chernov * diff.c: Include "system.h" to get memchr declaration. 2713f5e00e24SAndrey A. Chernov * system.h (memchr): Declare if !HAVE_MEMCHR, not if 2714f5e00e24SAndrey A. Chernov !HAVE_MEMCHR && !STDC_HEADERS. 2715f5e00e24SAndrey A. Chernov 2716f5e00e24SAndrey A. ChernovWed May 19 17:43:55 1993 Paul Eggert (eggert@twinsun.com) 2717f5e00e24SAndrey A. Chernov 2718f5e00e24SAndrey A. Chernov * Version 2.3 released. 2719f5e00e24SAndrey A. Chernov 2720f5e00e24SAndrey A. ChernovFri Apr 23 17:18:44 1993 Paul Eggert (eggert@twinsun.com) 2721f5e00e24SAndrey A. Chernov 2722f5e00e24SAndrey A. Chernov * io.c (find_identical_ends): Do not discard the last HORIZON_LINES 2723f5e00e24SAndrey A. Chernov lines of the prefix, or the first HORIZON_LINES lines of the suffix. 2724f5e00e24SAndrey A. Chernov * diff.c (main, longopts, usage): Add --horizon-lines option. 2725f5e00e24SAndrey A. Chernov * diff3.c (main, process_diff, read_diff): Invoke second diff 2726f5e00e24SAndrey A. Chernov with --horizon-lines determined by the first diff. 2727f5e00e24SAndrey A. Chernov * diff.h, diff3.c (horizon_lines): New variable. 2728f5e00e24SAndrey A. Chernov 2729f5e00e24SAndrey A. ChernovMon Mar 22 16:16:00 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) 2730f5e00e24SAndrey A. Chernov 2731f5e00e24SAndrey A. Chernov * system.h [HAVE_STRING_H || STDC_HEADERS] (bcopy, bcmp, bzero): 2732f5e00e24SAndrey A. Chernov Don't define if already defined. 2733f5e00e24SAndrey A. Chernov 2734f5e00e24SAndrey A. ChernovFri Mar 5 00:20:16 1993 Richard Stallman (rms@mole.gnu.ai.mit.edu) 2735f5e00e24SAndrey A. Chernov 2736f5e00e24SAndrey A. Chernov * diff.c (main): Use NULL in arg to compare_files. 2737f5e00e24SAndrey A. Chernov 2738f5e00e24SAndrey A. ChernovThu Feb 25 15:26:01 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) 2739f5e00e24SAndrey A. Chernov 2740f5e00e24SAndrey A. Chernov * system.h: Declare memchr #if !HAVE_MEMCHR && !STDC_HEADERS, 2741f5e00e24SAndrey A. Chernov not #if !HAVE_MEMCHR || !STDC_HEADERS. 2742f5e00e24SAndrey A. Chernov 2743f5e00e24SAndrey A. ChernovMon Feb 22 15:04:46 1993 Richard Stallman (rms@geech.gnu.ai.mit.edu) 2744f5e00e24SAndrey A. Chernov 2745f5e00e24SAndrey A. Chernov * io.c (find_identical_ends): Move complicated arg outside GUESS_LINES. 2746f5e00e24SAndrey A. Chernov 2747f5e00e24SAndrey A. ChernovMon Feb 22 12:56:12 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) 2748f5e00e24SAndrey A. Chernov 2749f5e00e24SAndrey A. Chernov * Makefile.in (.c.o): Add -I$(srcdir); put $(CFLAGS) last before $<. 2750f5e00e24SAndrey A. Chernov 2751f5e00e24SAndrey A. ChernovSat Feb 20 19:18:56 1993 Richard Stallman (rms@mole.gnu.ai.mit.edu) 2752f5e00e24SAndrey A. Chernov 2753f5e00e24SAndrey A. Chernov * io.c (binary_file_p): Return zero if file size is zero. 2754f5e00e24SAndrey A. Chernov 2755f5e00e24SAndrey A. ChernovFri Feb 19 17:31:32 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu) 2756f5e00e24SAndrey A. Chernov 2757f5e00e24SAndrey A. Chernov * Version 2.2 released. 2758f5e00e24SAndrey A. Chernov 2759f5e00e24SAndrey A. Chernov * system.h [HAVE_STRING_H || STDC_HEADERS] (index, rindex): Don't 2760f5e00e24SAndrey A. Chernov define if already defined. 2761f5e00e24SAndrey A. Chernov 2762f5e00e24SAndrey A. ChernovWed Feb 17 17:08:00 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) 2763f5e00e24SAndrey A. Chernov 2764f5e00e24SAndrey A. Chernov * Makefile.in (srcs): Remove limits.h. 2765f5e00e24SAndrey A. Chernov 2766f5e00e24SAndrey A. ChernovThu Feb 11 03:36:00 1993 Richard Stallman (rms@mole.gnu.ai.mit.edu) 2767f5e00e24SAndrey A. Chernov 2768f5e00e24SAndrey A. Chernov * diff3.c (xmalloc): No longer static. 2769f5e00e24SAndrey A. Chernov 2770f5e00e24SAndrey A. Chernov * sdiff.c (edit): Allocate buf dynamically. 2771f5e00e24SAndrey A. Chernov 2772f5e00e24SAndrey A. Chernov * dir.c (dir_sort): Handle VOID_CLOSEDIR. 2773f5e00e24SAndrey A. Chernov 2774f5e00e24SAndrey A. ChernovWed Feb 10 00:15:54 1993 Richard Stallman (rms@mole.gnu.ai.mit.edu) 2775f5e00e24SAndrey A. Chernov 2776f5e00e24SAndrey A. Chernov * limits.h: File deleted (should never have been there). 2777f5e00e24SAndrey A. Chernov 2778f5e00e24SAndrey A. ChernovTue Feb 9 03:53:22 1993 Richard Stallman (rms@mole.gnu.ai.mit.edu) 2779f5e00e24SAndrey A. Chernov 2780f5e00e24SAndrey A. Chernov * Makefile.in (.c.o, diff3.o, sdiff.o): Put $(CFLAGS) last. 2781f5e00e24SAndrey A. Chernov 2782f5e00e24SAndrey A. ChernovWed Feb 3 15:42:10 1993 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu) 2783f5e00e24SAndrey A. Chernov 2784f5e00e24SAndrey A. Chernov * system.h: Don't #define const; let configure do it. 2785f5e00e24SAndrey A. Chernov 2786f5e00e24SAndrey A. ChernovMon Feb 1 02:13:23 1993 Paul Eggert (eggert@hal.gnu.ai.mit.edu) 2787f5e00e24SAndrey A. Chernov 2788f5e00e24SAndrey A. Chernov * Version 2.1 released. 2789f5e00e24SAndrey A. Chernov 2790f5e00e24SAndrey A. Chernov * Makefile.in (dist): Survive ln failures. Create .tar.z 2791f5e00e24SAndrey A. Chernov (gzipped tar) file as well as .tar.Z (compressed tar) file. 2792f5e00e24SAndrey A. Chernov 2793f5e00e24SAndrey A. ChernovFri Jan 8 22:31:41 1993 Paul Eggert (eggert@twinsun.com) 2794f5e00e24SAndrey A. Chernov 2795f5e00e24SAndrey A. Chernov * side.c (print_half_line): When the input position falls 2796f5e00e24SAndrey A. Chernov outside the column, do not output a tab even if the output 2797f5e00e24SAndrey A. Chernov position still falls within the column. 2798f5e00e24SAndrey A. Chernov 2799f5e00e24SAndrey A. ChernovMon Dec 21 13:54:36 1992 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu) 2800f5e00e24SAndrey A. Chernov 2801f5e00e24SAndrey A. Chernov * Makefile.in (.c.o): Add -I. 2802f5e00e24SAndrey A. Chernov 2803f5e00e24SAndrey A. ChernovFri Dec 18 14:08:20 1992 Paul Eggert (eggert@twinsun.com) 2804f5e00e24SAndrey A. Chernov 2805f5e00e24SAndrey A. Chernov * configure.in: Add HAVE_FCNTL_H, since system.h uses it. 2806f5e00e24SAndrey A. Chernov 2807f5e00e24SAndrey A. ChernovTue Nov 24 10:06:48 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu) 2808f5e00e24SAndrey A. Chernov 2809f5e00e24SAndrey A. Chernov * Makefile.in: Note change from USG to HAVE_STRING_H. 2810f5e00e24SAndrey A. Chernov 2811f5e00e24SAndrey A. ChernovMon Nov 23 18:44:00 1992 Paul Eggert (eggert@twinsun.com) 2812f5e00e24SAndrey A. Chernov 2813f5e00e24SAndrey A. Chernov * io.c (find_and_hash_each_line): When running out of lines, 2814f5e00e24SAndrey A. Chernov double the number of allocated lines, instead of just doubling 2815f5e00e24SAndrey A. Chernov that number minus the prefix lines. This is more likely to 2816f5e00e24SAndrey A. Chernov avoid the need for further memory allocation. 2817f5e00e24SAndrey A. Chernov 2818f5e00e24SAndrey A. ChernovWed Nov 18 20:40:28 1992 Paul Eggert (eggert@twinsun.com) 2819f5e00e24SAndrey A. Chernov 2820f5e00e24SAndrey A. Chernov * dir.c (dir_sort): Plug memory leak: space holding directory 2821f5e00e24SAndrey A. Chernov contents was not being reclaimed. Get directory size from 2822f5e00e24SAndrey A. Chernov struct file_data for initial guess at memory needed. 2823f5e00e24SAndrey A. Chernov Detect errors when reading and closing directory. 2824f5e00e24SAndrey A. Chernov (diff_dirs): Pass struct file_data to dir_sort. Finish plugging leak. 2825f5e00e24SAndrey A. Chernov * diff.c (compare_files): Pass struct file_data to diff_dirs. 2826f5e00e24SAndrey A. Chernov 2827f5e00e24SAndrey A. Chernov * io.c (find_and_hash_each_line): Don't assume alloc_lines is 2828f5e00e24SAndrey A. Chernov nonzero when allocating more lines. 2829f5e00e24SAndrey A. Chernov 2830f5e00e24SAndrey A. ChernovThu Nov 12 16:02:18 1992 Paul Eggert (eggert@twinsun.com) 2831f5e00e24SAndrey A. Chernov 2832f5e00e24SAndrey A. Chernov * diff.c (main): Add `-U lines' as an alias for `--unified=lines'. 2833f5e00e24SAndrey A. Chernov 2834f5e00e24SAndrey A. Chernov * diff3.c (usage): Add third --label option in example. 2835f5e00e24SAndrey A. Chernov 2836f5e00e24SAndrey A. Chernov * util.c (analyze_hunk): Fix test for ignoring blank lines. 2837f5e00e24SAndrey A. Chernov 2838f5e00e24SAndrey A. Chernov * configure.in, system.h: Avoid USG; use HAVE_TIME_H etc. instead. 2839f5e00e24SAndrey A. Chernov 2840f5e00e24SAndrey A. ChernovMon Nov 9 05:13:25 1992 Paul Eggert (eggert@twinsun.com) 2841f5e00e24SAndrey A. Chernov 2842f5e00e24SAndrey A. Chernov * diff3.c (main, usage): Add -A or --show-all. 2843f5e00e24SAndrey A. Chernov -m now defaults to -A, not -E. Allow up to three -L options. 2844f5e00e24SAndrey A. Chernov (output_diff3_edscript, output_diff3_merge): 2845f5e00e24SAndrey A. Chernov Remove spurious differences between these two functions. 2846f5e00e24SAndrey A. Chernov Output ||||||| for -A. Distinguish between conflicts and overlaps. 2847f5e00e24SAndrey A. Chernov (dotlines, undotlines): New functions that output `Ns', not `N,Ns'. 2848f5e00e24SAndrey A. Chernov (output_diff3_edscript, output_diff3_merge): Use them. 2849f5e00e24SAndrey A. Chernov 2850f5e00e24SAndrey A. Chernov * io.c (find_identical_ends): shift_boundaries needs an extra 2851f5e00e24SAndrey A. Chernov identical line at the end, not at the beginning. 2852f5e00e24SAndrey A. Chernov 2853f5e00e24SAndrey A. Chernov * sdiff.c (edit): execvp wants char **, not const char **. 2854f5e00e24SAndrey A. Chernov 2855f5e00e24SAndrey A. ChernovMon Oct 19 04:39:32 1992 Paul Eggert (eggert@twinsun.com) 2856f5e00e24SAndrey A. Chernov 2857f5e00e24SAndrey A. Chernov * context.c (print_context_script, find_function): Context 2858f5e00e24SAndrey A. Chernov line numbers start with - file->prefix_lines, not 0. 2859f5e00e24SAndrey A. Chernov 2860f5e00e24SAndrey A. Chernov * io.c (binary_file_p): Undo last change; it was a library bug. 2861f5e00e24SAndrey A. Chernov 2862f5e00e24SAndrey A. ChernovSun Oct 18 00:17:29 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) 2863f5e00e24SAndrey A. Chernov 2864f5e00e24SAndrey A. Chernov * io.c (binary_file_p): Consider empty file as non-binary. 2865f5e00e24SAndrey A. Chernov 2866f5e00e24SAndrey A. ChernovMon Oct 5 05:18:46 1992 Paul Eggert (eggert@twinsun.com) 2867f5e00e24SAndrey A. Chernov 2868f5e00e24SAndrey A. Chernov * diff3.c (main, make_3way_diff, using_to_diff3_block): Don't 2869f5e00e24SAndrey A. Chernov report bogus differences (for one of -mexEX3) just because the 2870f5e00e24SAndrey A. Chernov file0-file1 diffs don't line up with the file0-file2 diffs. 2871f5e00e24SAndrey A. Chernov (This is entirely possible since we don't use diff's -n 2872f5e00e24SAndrey A. Chernov option.) Always compare file1 to file2, so that diff3 sees 2873f5e00e24SAndrey A. Chernov those changes directly. Typically, file2 is now the common 2874f5e00e24SAndrey A. Chernov file, not file0. 2875f5e00e24SAndrey A. Chernov (output_diff3_merge): The input file is file 0, not the common file. 2876f5e00e24SAndrey A. Chernov 2877f5e00e24SAndrey A. Chernov (FC, FO): New macros; they replace FILE1, FILE0 for two-way diffs, 2878f5e00e24SAndrey A. Chernov to distinguish them from three-way diffs. 2879f5e00e24SAndrey A. Chernov 2880f5e00e24SAndrey A. Chernov * diff3.c (using_to_diff3_block): Fold repeated code into loops. 2881f5e00e24SAndrey A. Chernov 2882f5e00e24SAndrey A. Chernov * diff3.c (make_3way_diff, process_diff): Have the *_end 2883f5e00e24SAndrey A. Chernov variable point to the next field to be changed, not to the last 2884f5e00e24SAndrey A. Chernov object allocated; this saves an if-then-else. 2885f5e00e24SAndrey A. Chernov 2886f5e00e24SAndrey A. Chernov * diff3.c (process_diff): Use D_NUMLINES instead of its definiens. 2887f5e00e24SAndrey A. Chernov 2888f5e00e24SAndrey A. Chernov * diff3.c: Make fns and vars static unless they must be external. 2889f5e00e24SAndrey A. Chernov 2890f5e00e24SAndrey A. ChernovWed Sep 30 09:21:59 1992 Paul Eggert (eggert@twinsun.com) 2891f5e00e24SAndrey A. Chernov 2892f5e00e24SAndrey A. Chernov * analyze.c (diff_2_files): OUTPUT_IFDEF is now robust. 2893f5e00e24SAndrey A. Chernov * diff.h (ROBUST_OUTPUT_STYLE): Likewise. 2894f5e00e24SAndrey A. Chernov (default_line_format): Remove. All refs removed. 2895f5e00e24SAndrey A. Chernov 2896f5e00e24SAndrey A. Chernov * ifdef.c (print_ifdef_lines): Add %L. Optimize %l\n even if user 2897f5e00e24SAndrey A. Chernov specified it, as opposed to its being the default. 2898f5e00e24SAndrey A. Chernov 2899f5e00e24SAndrey A. ChernovTue Sep 29 19:01:28 1992 Paul Eggert (eggert@twinsun.com) 2900f5e00e24SAndrey A. Chernov 2901f5e00e24SAndrey A. Chernov * diff.c (longopts, main): --{old,new,unchanged,changed}--group-format 2902f5e00e24SAndrey A. Chernov are new options, so that -D is no longer overloaded. Set 2903f5e00e24SAndrey A. Chernov no_diff_means_no_output if --unchanged-{line,group}-format allows it. 2904f5e00e24SAndrey A. Chernov * diff.h (enum line_class): New type. 2905f5e00e24SAndrey A. Chernov (group_format, line_format): Use it to regularize option flags. 2906f5e00e24SAndrey A. Chernov All refs changed. 2907f5e00e24SAndrey A. Chernov 2908f5e00e24SAndrey A. Chernov * ifdef.c (format_ifdef, print_ifdef_lines): %n is no longer a format. 2909f5e00e24SAndrey A. Chernov 2910f5e00e24SAndrey A. ChernovMon Sep 28 04:51:42 1992 Paul Eggert (eggert@twinsun.com) 2911f5e00e24SAndrey A. Chernov 2912f5e00e24SAndrey A. Chernov * diff.c (main, usage): Replace --line-prefix with the more general 2913f5e00e24SAndrey A. Chernov --{old,new,unchanged}-line-format options. 2914f5e00e24SAndrey A. Chernov * ifdef.c (format_ifdef, print_ifdef_lines): Likewise. 2915f5e00e24SAndrey A. Chernov * diff.h (line_format): Renamed from line_prefix. All refs changed. 2916f5e00e24SAndrey A. Chernov * diff.h, ifdef.c (default_line_format): New variable. 2917f5e00e24SAndrey A. Chernov * util.c (output_1_line): New function. 2918f5e00e24SAndrey A. Chernov (print_1_line): Use it. 2919f5e00e24SAndrey A. Chernov 2920f5e00e24SAndrey A. Chernov * ifdef.c: (format_ifdef, print_ifdef_lines): Add %0 format. 2921f5e00e24SAndrey A. Chernov 2922f5e00e24SAndrey A. ChernovSun Sep 27 05:38:13 1992 Paul Eggert (eggert@twinsun.com) 2923f5e00e24SAndrey A. Chernov 2924f5e00e24SAndrey A. Chernov * diff.c (main): Add -E or --line-prefix option. Add -D'=xxx' 2925f5e00e24SAndrey A. Chernov for common lines. Change default -D< format from copy of -D> 2926f5e00e24SAndrey A. Chernov format to to -D<%<; similarly for default -D> format. 2927f5e00e24SAndrey A. Chernov * diff.h (common_format, line_prefix): New variables. 2928f5e00e24SAndrey A. Chernov * ifdef.c (format_ifdef): New function. 2929f5e00e24SAndrey A. Chernov (print_ifdef_script, print_ifdef_hunk, print_ifdef_lines): 2930f5e00e24SAndrey A. Chernov Use it for -D'=xxx', -E. 2931f5e00e24SAndrey A. Chernov 2932f5e00e24SAndrey A. Chernov * context.c (find_hunk): Glue together two non-ignorable changes that 2933f5e00e24SAndrey A. Chernov are exactly CONTEXT * 2 lines apart. This shortens output, removes 2934f5e00e24SAndrey A. Chernov a behavioral discontinuity at CONTEXT = 0, and is more compatible 2935f5e00e24SAndrey A. Chernov with traditional diff. 2936f5e00e24SAndrey A. Chernov 2937f5e00e24SAndrey A. Chernov * io.c (find_identical_ends): Slurp stdin at most once. 2938f5e00e24SAndrey A. Chernov 2939f5e00e24SAndrey A. Chernov * util.c (print_line_line): line_flag is const char *. 2940f5e00e24SAndrey A. Chernov 2941f5e00e24SAndrey A. ChernovThu Sep 24 15:18:07 1992 Paul Eggert (eggert@twinsun.com) 2942f5e00e24SAndrey A. Chernov 2943f5e00e24SAndrey A. Chernov * ifdef.c (print_ifdef_lines): New function, which fwrites a sequence 2944f5e00e24SAndrey A. Chernov of lines all at once for speed. 2945f5e00e24SAndrey A. Chernov (print_ifdef_script, print_ifdef_hunk): Use it. 2946f5e00e24SAndrey A. Chernov 2947f5e00e24SAndrey A. ChernovThu Sep 24 05:54:14 1992 Paul Eggert (eggert@twinsun.com) 2948f5e00e24SAndrey A. Chernov 2949f5e00e24SAndrey A. Chernov * diff.c (main): Support new -D options for if-then-else formats. 2950f5e00e24SAndrey A. Chernov (specify_format): New function. 2951f5e00e24SAndrey A. Chernov * diff.h (ifndef_format, ifdef_format, ifnelse_format): New variables. 2952f5e00e24SAndrey A. Chernov * ifdef.c (print_ifdef_hunk): Use the new variables instead of 2953f5e00e24SAndrey A. Chernov a hardwired format. 2954f5e00e24SAndrey A. Chernov 2955f5e00e24SAndrey A. Chernov * side.c (print_1sdiff_line): Represent incomplete lines on output. 2956f5e00e24SAndrey A. Chernov (print_sdiff_script): Likewise. Don't print 'q' at end, 2957f5e00e24SAndrey A. Chernov since that doesn't work with incomplete lines. 2958f5e00e24SAndrey A. Chernov * sdiff.c (interact): Don't assume diff output ends with 'q' line. 2959f5e00e24SAndrey A. Chernov * diff.h (ROBUST_OUTPUT_STYLE): OUTPUT_SDIFF is now robust. 2960f5e00e24SAndrey A. Chernov 2961f5e00e24SAndrey A. Chernov * sdiff.c (lf_copy, lf_snarf): Use memchr instead of index, 2962f5e00e24SAndrey A. Chernov to avoid dumping core when files contain null characters. 2963f5e00e24SAndrey A. Chernov (memchr): New function (if memchr is missing). 2964f5e00e24SAndrey A. Chernov 2965f5e00e24SAndrey A. Chernov * io.c (sip): New arg SKIP_TEST to skip test for binary file. 2966f5e00e24SAndrey A. Chernov (read_files): Don't bother testing second file if first is binary. 2967f5e00e24SAndrey A. Chernov 2968f5e00e24SAndrey A. ChernovThu Sep 17 21:17:49 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) 2969f5e00e24SAndrey A. Chernov 2970f5e00e24SAndrey A. Chernov * system.h [!USG && !_POSIX_VERSION]: Protect from conflicting 2971f5e00e24SAndrey A. Chernov prototype for wait in sys/wait.h. 2972f5e00e24SAndrey A. Chernov 2973f5e00e24SAndrey A. ChernovWed Sep 16 12:32:18 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) 2974f5e00e24SAndrey A. Chernov 2975f5e00e24SAndrey A. Chernov * Makefile.in: Include binprefix in -DDIFF_PROGRAM. 2976f5e00e24SAndrey A. Chernov 2977f5e00e24SAndrey A. ChernovTue Sep 15 14:27:25 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) 2978f5e00e24SAndrey A. Chernov 2979f5e00e24SAndrey A. Chernov * Version 2.0. 2980f5e00e24SAndrey A. Chernov 2981f5e00e24SAndrey A. ChernovSat Sep 12 01:31:19 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) 2982f5e00e24SAndrey A. Chernov 2983f5e00e24SAndrey A. Chernov * util.c, diff.h, system.h [!HAVE_MEMCHR]: Don't use void * 2984f5e00e24SAndrey A. Chernov and const when declaring memchr replacement. Declare memchr 2985f5e00e24SAndrey A. Chernov if !STDC_HEADERS && !USG. 2986f5e00e24SAndrey A. Chernov 2987f5e00e24SAndrey A. ChernovThu Sep 10 15:17:32 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) 2988f5e00e24SAndrey A. Chernov 2989f5e00e24SAndrey A. Chernov * Makefile.in (uninstall): New target. 2990f5e00e24SAndrey A. Chernov 2991f5e00e24SAndrey A. Chernov * diff.c (excluded_filename): Use fnmatch, not wildmat. 2992f5e00e24SAndrey A. Chernov (usage): Document -x, -X, --exclude, --exclude-from. 2993f5e00e24SAndrey A. Chernov Makefile.in: Use fnmatch.c, not wildmat.c. 2994f5e00e24SAndrey A. Chernov 2995f5e00e24SAndrey A. ChernovSun Sep 6 23:46:25 1992 Paul Eggert (eggert@twinsun.com) 2996f5e00e24SAndrey A. Chernov 2997f5e00e24SAndrey A. Chernov * configure.in: Add HAVE_MEMCHR. 2998f5e00e24SAndrey A. Chernov * diff.h, util.c: Use it instead of MEMCHR_MISSING. 2999f5e00e24SAndrey A. Chernov 3000f5e00e24SAndrey A. ChernovSun Sep 6 07:25:49 1992 Paul Eggert (eggert@twinsun.com) 3001f5e00e24SAndrey A. Chernov 3002f5e00e24SAndrey A. Chernov * diff.h: (struct line_def): Replace this 3-word struct with char *. 3003f5e00e24SAndrey A. Chernov This uses less memory, particularly for large files with short lines. 3004f5e00e24SAndrey A. Chernov (struct file_data): New member linbuf_base counts number of lines 3005f5e00e24SAndrey A. Chernov in common prefix that are not recorded in linbuf; 3006f5e00e24SAndrey A. Chernov this uses less memory if files are identical or differ only at end. 3007f5e00e24SAndrey A. Chernov New member buffered_lines counts possibly differing lines. 3008f5e00e24SAndrey A. Chernov New member valid_lines counts valid data. 3009f5e00e24SAndrey A. Chernov New member alloc_lines - linbuf_base replaces old linbufsize. 3010f5e00e24SAndrey A. Chernov linbuf[0] now always points at first differing line. 3011f5e00e24SAndrey A. Chernov Remove unused members ltran, suffix_lines. 3012f5e00e24SAndrey A. Chernov Add const where appropriate. 3013f5e00e24SAndrey A. Chernov (Is_space): New macro, for consistent definition of `white space'. 3014f5e00e24SAndrey A. Chernov (excluded_filename, memchr, sip, slurp): New declarations. 3015f5e00e24SAndrey A. Chernov * ed.c (print_ed_hunk): Adjust to diff.h's struct changes. 3016f5e00e24SAndrey A. Chernov * context.c (pr_context_hunk): Likewise. 3017f5e00e24SAndrey A. Chernov * ifdef.c (print_ifdef_script): Likewise. 3018f5e00e24SAndrey A. Chernov * side.c (print_sdiff_script, print_half_line): Likewise. 3019f5e00e24SAndrey A. Chernov * util.c (analyze_hunk, line_cmp, print_1_line): Likewise. 3020f5e00e24SAndrey A. Chernov 3021f5e00e24SAndrey A. Chernov * analyze.c (shift_boundaries): Remove unneeded variable `end' and 3022f5e00e24SAndrey A. Chernov unnecessary comparisons of `preceding' and `other_preceding' against 0. 3023f5e00e24SAndrey A. Chernov (diff_2_files): When comparing files byte-by-byte for equality, 3024f5e00e24SAndrey A. Chernov don't slurp them all in at once; just compare them a buffer at a time. 3025f5e00e24SAndrey A. Chernov This can win big if they differ early on. 3026f5e00e24SAndrey A. Chernov Move some code to compare_files to enable this change. 3027f5e00e24SAndrey A. Chernov Use only one buffer for stdin with `diff - -'. 3028f5e00e24SAndrey A. Chernov (discard_confusing_lines, diff_2_files): Coalesce malloc/free calls. 3029f5e00e24SAndrey A. Chernov (build_script): Remove obsolete OUTPUT_RCS code. 3030f5e00e24SAndrey A. Chernov 3031f5e00e24SAndrey A. Chernov * diff.c (add_exclude, add_exclude_file, excluded_filename): New fns. 3032f5e00e24SAndrey A. Chernov (main): Use them for the new --exclude and --exclude-from options. 3033f5e00e24SAndrey A. Chernov (compare_files): Don't open a file unless it must be read. 3034f5e00e24SAndrey A. Chernov Treat `diff file file' and `diff file dir' similarly. 3035f5e00e24SAndrey A. Chernov Move some code here from diff_2_files to enable this. 3036f5e00e24SAndrey A. Chernov Simplify file vs dir warning. 3037f5e00e24SAndrey A. Chernov 3038f5e00e24SAndrey A. Chernov * dir.c (dir_sort): Support new --exclude* options. 3039f5e00e24SAndrey A. Chernov 3040f5e00e24SAndrey A. Chernov * io.c (struct equivclass): Put hash code and line length here instead 3041f5e00e24SAndrey A. Chernov of struct line_def, so that they can be shared. 3042f5e00e24SAndrey A. Chernov (find_and_hash_each_line): Compute equivalence class as we go, 3043f5e00e24SAndrey A. Chernov instead of doing it in a separate pass; this thrashes memory less. 3044f5e00e24SAndrey A. Chernov Make buckets realloc-able, since we can't preallocate them. 3045f5e00e24SAndrey A. Chernov Record one more line start than there are lines, so that we can compute 3046f5e00e24SAndrey A. Chernov any line's length by subtracting its start from the next line's, 3047f5e00e24SAndrey A. Chernov instead of storing the length explicitly. This saves memory. 3048f5e00e24SAndrey A. Chernov Move prefix-handling code to find_identical_ends; 3049f5e00e24SAndrey A. Chernov this wins with large prefixes. 3050f5e00e24SAndrey A. Chernov Use Is_space, not is_space, for consistent treatment of white space. 3051f5e00e24SAndrey A. Chernov (prepare_text_end): New function. 3052f5e00e24SAndrey A. Chernov (find_identical_ends): Move slurping here, so it's only done when 3053f5e00e24SAndrey A. Chernov needed. Work even if the buffers are the same (because of `diff - -'). 3054f5e00e24SAndrey A. Chernov Compare prefixes a word at a time for speed. 3055f5e00e24SAndrey A. Chernov (find_equiv_class): Delete; now done by find_and_hash_each_line. 3056f5e00e24SAndrey A. Chernov (read_files): Don't slurp unless needed. 3057f5e00e24SAndrey A. Chernov find_equiv_class's work is now folded into find_and_hash_each_line. 3058f5e00e24SAndrey A. Chernov Don't copy stdin buffer if `diff - -'. 3059f5e00e24SAndrey A. Chernov Check for running out of primes. 3060f5e00e24SAndrey A. Chernov (sip, slurp): Split first part of `slurp' into another function `sip'. 3061f5e00e24SAndrey A. Chernov `sip' sets things up and perhaps reads the first ST_BLKSIZE buffer to 3062f5e00e24SAndrey A. Chernov see whether the file is binary; `slurp' now just finishes the job. 3063f5e00e24SAndrey A. Chernov This lets diff_2_files compare binary files lazily. 3064f5e00e24SAndrey A. Chernov Allocate a one-word sentinel to allow word-at-a-time prefix comparison. 3065f5e00e24SAndrey A. Chernov Count prefix lines only if needed, only count the first file's prefix. 3066f5e00e24SAndrey A. Chernov Don't bother to count suffix lines; it's never needed. 3067f5e00e24SAndrey A. Chernov Set up linbuf[0] to point at first differing line. 3068f5e00e24SAndrey A. Chernov (binary_file_p): Change test for binary files: 3069f5e00e24SAndrey A. Chernov if it has a null byte in its first buffer, it's binary. 3070f5e00e24SAndrey A. Chernov (primes): Add more primes. 3071f5e00e24SAndrey A. Chernov 3072f5e00e24SAndrey A. Chernov * util.c (line_cmp): Use bcmp for speed. 3073f5e00e24SAndrey A. Chernov Use Is_space, not is_space, for consistent treatment of white space. 3074f5e00e24SAndrey A. Chernov (translate_line_number): Internal line numbers now count from 0 3075f5e00e24SAndrey A. Chernov starting after the prefix. 3076f5e00e24SAndrey A. Chernov (memchr): New function (if memchr is missing). 3077f5e00e24SAndrey A. Chernov 3078f5e00e24SAndrey A. Chernov * Makefile.in: Document HAVE_ST_BLKSIZE. Link with wildmat.o. 3079f5e00e24SAndrey A. Chernov * system.h (STAT_BLOCKSIZE): New macro based on HAVE_ST_BLKSIZE. 3080f5e00e24SAndrey A. Chernov * configure.in: Add AC_ST_BLKSIZE. 3081f5e00e24SAndrey A. Chernov * wildmat.c: New file. 3082f5e00e24SAndrey A. Chernov 3083f5e00e24SAndrey A. ChernovFri Sep 4 01:28:51 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) 3084f5e00e24SAndrey A. Chernov 3085f5e00e24SAndrey A. Chernov * sdiff.c (xmalloc): Renamed from ck_malloc. Callers changed. 3086f5e00e24SAndrey A. Chernov 3087f5e00e24SAndrey A. ChernovThu Sep 3 15:28:59 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) 3088f5e00e24SAndrey A. Chernov 3089f5e00e24SAndrey A. Chernov * diff.h: Don't declare free, index, rindex. 3090f5e00e24SAndrey A. Chernov 3091f5e00e24SAndrey A. ChernovTue Aug 11 22:18:06 1992 John Gilmore (gnu at cygnus.com) 3092f5e00e24SAndrey A. Chernov 3093f5e00e24SAndrey A. Chernov * io.c (binary_file_p): Use heuristic to avoid declaring info 3094f5e00e24SAndrey A. Chernov files as binary files. Allow about 1.5% non-printing 3095f5e00e24SAndrey A. Chernov characters (in info's case, ^_). 3096f5e00e24SAndrey A. Chernov 3097f5e00e24SAndrey A. ChernovTue Jul 7 01:09:26 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) 3098f5e00e24SAndrey A. Chernov 3099f5e00e24SAndrey A. Chernov * diff.h: Replace function_regexp and ignore_regexp with lists 3100f5e00e24SAndrey A. Chernov of compiled regexps. 3101f5e00e24SAndrey A. Chernov * analyze.c, context.c, util.c: Test whether the lists, not 3102f5e00e24SAndrey A. Chernov the old variables, are empty. 3103f5e00e24SAndrey A. Chernov * util.c (analyze_hunk), context.c (find_function): Compare 3104f5e00e24SAndrey A. Chernov lines with the lists of regexps. 3105f5e00e24SAndrey A. Chernov * diff.c (add_regexp): New function. 3106f5e00e24SAndrey A. Chernov (main): Use it. 3107f5e00e24SAndrey A. Chernov 3108f5e00e24SAndrey A. Chernov * diff3: Add -v --version option. 3109f5e00e24SAndrey A. Chernov * Makefile.in: Link with version.o. 3110f5e00e24SAndrey A. Chernov 3111f5e00e24SAndrey A. Chernov * system.h: New file. 3112f5e00e24SAndrey A. Chernov * diff.h, cmp.c, diff3.c, sdiff.c: Use it. 3113f5e00e24SAndrey A. Chernov 3114f5e00e24SAndrey A. Chernov * diff.h, diff3.c: Include string.h or strings.h, as appropriate. 3115f5e00e24SAndrey A. Chernov Declare malloc and realloc. 3116f5e00e24SAndrey A. Chernov 3117f5e00e24SAndrey A. Chernov * diff3.c (perror_with_exit): Include program name in message. 3118f5e00e24SAndrey A. Chernov 3119f5e00e24SAndrey A. Chernov * diff3.c: Lowercase error messages for GNU standards. 3120f5e00e24SAndrey A. Chernov 3121f5e00e24SAndrey A. Chernov * sdiff.c [USG || STDC_HEADERS]: Define bcopy in terms of memcpy. 3122f5e00e24SAndrey A. Chernov 3123f5e00e24SAndrey A. Chernov * sdiff.c: Use the version number from version.c. 3124f5e00e24SAndrey A. Chernov * Makefile.in: Link with version.o. 3125f5e00e24SAndrey A. Chernov 3126f5e00e24SAndrey A. Chernov * cmp.c error.c xmalloc.c: New files from textutils. 3127f5e00e24SAndrey A. Chernov * Makefile.in: Add rules for them. 3128f5e00e24SAndrey A. Chernov 3129f5e00e24SAndrey A. Chernov * diff.c (longopts): --unidirectional-new-file is like -P, not -N. 3130f5e00e24SAndrey A. Chernov Rename --file-label to --label (leave old name, but undocumented). 3131f5e00e24SAndrey A. Chernov 3132f5e00e24SAndrey A. Chernov * sdiff.c, diff.c (usage): Condense messages and fix some errors. 3133f5e00e24SAndrey A. Chernov 3134f5e00e24SAndrey A. Chernov * diff3.c (main, usage): Add long-named options. 3135f5e00e24SAndrey A. Chernov 3136f5e00e24SAndrey A. ChernovFri Jul 3 14:31:18 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) 3137f5e00e24SAndrey A. Chernov 3138f5e00e24SAndrey A. Chernov * diff.h, diff3.c, sdiff.c: Change FOO_MISSING macros to HAVE_FOO. 3139f5e00e24SAndrey A. Chernov 3140f5e00e24SAndrey A. ChernovThu Jun 25 16:59:47 1992 David J. MacKenzie (djm@apple-gunkies.gnu.ai.mit.edu) 3141f5e00e24SAndrey A. Chernov 3142f5e00e24SAndrey A. Chernov * diff.c: --reversed-ed -> --forward-ed. 3143f5e00e24SAndrey A. Chernov 3144f5e00e24SAndrey A. ChernovWed Feb 26 12:17:32 1992 Paul Eggert (eggert@yata.uucp) 3145f5e00e24SAndrey A. Chernov 3146f5e00e24SAndrey A. Chernov * analyze.c, diff.c, diff.h, io.c: For -y, compare even if same file. 3147f5e00e24SAndrey A. Chernov 3148f5e00e24SAndrey A. ChernovFri Feb 14 22:46:38 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) 3149f5e00e24SAndrey A. Chernov 3150f5e00e24SAndrey A. Chernov * io.c, diff3.c, analyze.c: Add extra parentheses. 3151f5e00e24SAndrey A. Chernov 3152f5e00e24SAndrey A. ChernovSun Feb 9 00:22:42 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) 3153f5e00e24SAndrey A. Chernov 3154f5e00e24SAndrey A. Chernov * diff.h (unidirectional_new_file_flag): New variable. 3155f5e00e24SAndrey A. Chernov * diff.c (main): Set that for -P. 3156f5e00e24SAndrey A. Chernov (compare_files): Support -P, somewhat like -N. 3157f5e00e24SAndrey A. Chernov (longopts): Support long name for -P. 3158f5e00e24SAndrey A. Chernov 3159f5e00e24SAndrey A. ChernovSat Jan 4 20:10:34 1992 Paul Eggert (eggert at yata.uucp) 3160f5e00e24SAndrey A. Chernov 3161f5e00e24SAndrey A. Chernov * Makefile.in: Distribute diff.info-* too. 3162f5e00e24SAndrey A. Chernov 3163f5e00e24SAndrey A. Chernov * README, sdiff.c: version number now matches version.c. 3164f5e00e24SAndrey A. Chernov 3165f5e00e24SAndrey A. Chernov * configure: Fix and document vfork test. 3166f5e00e24SAndrey A. Chernov 3167f5e00e24SAndrey A. Chernov * ifdef.c: Don't dump core if `diff -Dx f f'. 3168f5e00e24SAndrey A. Chernov 3169f5e00e24SAndrey A. ChernovMon Dec 23 23:36:08 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu) 3170f5e00e24SAndrey A. Chernov 3171f5e00e24SAndrey A. Chernov * diff.h, diff3.c, sdiff.c: Change POSIX ifdefs to 3172f5e00e24SAndrey A. Chernov HAVE_UNISTD_H and _POSIX_VERSION. 3173f5e00e24SAndrey A. Chernov 3174f5e00e24SAndrey A. ChernovWed Dec 18 17:00:31 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu) 3175f5e00e24SAndrey A. Chernov 3176f5e00e24SAndrey A. Chernov * Makefile.in (srcs): Add sdiff.c. 3177f5e00e24SAndrey A. Chernov (tapefiles): Add diff.texi and diff.info. 3178f5e00e24SAndrey A. Chernov 3179f5e00e24SAndrey A. Chernov * diff.h, diff3.c, sdiff.c: Use HAVE_VFORK_H instead of 3180f5e00e24SAndrey A. Chernov VFORK_HEADER and VFORK_WORKS. 3181f5e00e24SAndrey A. Chernov 3182f5e00e24SAndrey A. ChernovTue Dec 17 00:02:59 1991 Paul Eggert (eggert at yata.uucp) 3183f5e00e24SAndrey A. Chernov 3184f5e00e24SAndrey A. Chernov * Makefile.in (all): Add diff.info, sdiff. 3185f5e00e24SAndrey A. Chernov 3186f5e00e24SAndrey A. Chernov * configure, diff.c, sdiff.c: 3187f5e00e24SAndrey A. Chernov Prefix long options with `--', not `+'. 3188f5e00e24SAndrey A. Chernov * diff.c: Regularize option names. 3189f5e00e24SAndrey A. Chernov 3190f5e00e24SAndrey A. Chernov * configure: Fix check for vfork. 3191f5e00e24SAndrey A. Chernov * configure, diff.c, diff.h, diff3.c, sdiff.c: 3192f5e00e24SAndrey A. Chernov Use Posix definitions when possible. 3193f5e00e24SAndrey A. Chernov 3194f5e00e24SAndrey A. Chernov * context.c: Align context with tab if -T is given. Tune. 3195f5e00e24SAndrey A. Chernov * diff.c, diff.h, side.c: Calculate column widths so that tabs line up. 3196f5e00e24SAndrey A. Chernov * io.c: Add distinction between white space and printing chars. 3197f5e00e24SAndrey A. Chernov * side.c: Don't expand tabs unless -t is given. 3198f5e00e24SAndrey A. Chernov * side.c, util.c: Tab expansion now knows about '\b', '\f', '\r', '\v'. 3199f5e00e24SAndrey A. Chernov * util.c: -w skips all white space. Remove lint. Tune. 3200f5e00e24SAndrey A. Chernov 3201f5e00e24SAndrey A. Chernov * sdiff.c: Support many more diff options, e.g. `-', `sdiff file dir'. 3202f5e00e24SAndrey A. Chernov Ignore interrupts while the subsidiary editor is in control. 3203f5e00e24SAndrey A. Chernov Clean up temporary file and kill subsidiary diff if interrupted. 3204f5e00e24SAndrey A. Chernov Ensure subsidiary diff doesn't ignore SIGPIPE. 3205f5e00e24SAndrey A. Chernov Don't get confused while waiting for two subprocesses. 3206f5e00e24SAndrey A. Chernov Don't let buffers overflow. Check for I/O errors. 3207f5e00e24SAndrey A. Chernov Convert to GNU style. Tune. 3208f5e00e24SAndrey A. Chernov 3209f5e00e24SAndrey A. Chernov * sdiff.c, util.c: Don't lose errno. 3210f5e00e24SAndrey A. Chernov Don't confuse sdiff with messages like `Binary files differ'. 3211f5e00e24SAndrey A. Chernov * sdiff.c, side.c: Don't assume that common lines are identical. 3212f5e00e24SAndrey A. Chernov Simplify --sdiff-merge-assist format. 3213f5e00e24SAndrey A. Chernov 3214f5e00e24SAndrey A. ChernovMon Sep 16 16:42:01 1991 Tom Lord (lord at churchy.gnu.ai.mit.edu) 3215f5e00e24SAndrey A. Chernov 3216f5e00e24SAndrey A. Chernov * Makefile.in, sdiff.c: introduced sdiff front end to diff. 3217f5e00e24SAndrey A. Chernov 3218f5e00e24SAndrey A. Chernov * Makefile.in, analyze.c, diff.c, diff.h, io.c, side.c: Added 3219f5e00e24SAndrey A. Chernov sdiff-style output format to diff. 3220f5e00e24SAndrey A. Chernov 3221f5e00e24SAndrey A. ChernovMon Aug 26 16:44:55 1991 David J. MacKenzie (djm at pogo.gnu.ai.mit.edu) 3222f5e00e24SAndrey A. Chernov 3223f5e00e24SAndrey A. Chernov * Makefile.in, configure: Only put $< in Makefile if using VPATH, 3224f5e00e24SAndrey A. Chernov because older makes don't understand it. 3225f5e00e24SAndrey A. Chernov 3226f5e00e24SAndrey A. ChernovFri Aug 2 12:22:30 1991 David J. MacKenzie (djm at apple-gunkies) 3227f5e00e24SAndrey A. Chernov 3228f5e00e24SAndrey A. Chernov * configure: Create config.status. Remove it and Makefile if 3229f5e00e24SAndrey A. Chernov interrupted while creating them. 3230f5e00e24SAndrey A. Chernov 3231f5e00e24SAndrey A. ChernovThu Aug 1 22:24:31 1991 David J. MacKenzie (djm at apple-gunkies) 3232f5e00e24SAndrey A. Chernov 3233f5e00e24SAndrey A. Chernov * configure: Check for +srcdir etc. arg and look for 3234f5e00e24SAndrey A. Chernov Makefile.in in that directory. Set VPATH if srcdir is not `.'. 3235f5e00e24SAndrey A. Chernov * Makefile.in: Get rid of $(archpfx). 3236f5e00e24SAndrey A. Chernov 3237f5e00e24SAndrey A. ChernovTue Jul 30 21:28:44 1991 Richard Stallman (rms at mole.gnu.ai.mit.edu) 3238f5e00e24SAndrey A. Chernov 3239f5e00e24SAndrey A. Chernov * Makefile.in (prefix): Renamed from DESTDIR. 3240f5e00e24SAndrey A. Chernov 3241f5e00e24SAndrey A. ChernovWed Jul 24 23:08:56 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu) 3242f5e00e24SAndrey A. Chernov 3243f5e00e24SAndrey A. Chernov * diff.h, diff3.c: Rearrange ifdefs to use POSIX, 3244f5e00e24SAndrey A. Chernov STDC_HEADERS, VFORK_MISSING, DIRENT. This way it works on 3245f5e00e24SAndrey A. Chernov more systems that aren't pure USG or BSD. 3246f5e00e24SAndrey A. Chernov Don't not define const if __GNUC__ is defined -- that would 3247f5e00e24SAndrey A. Chernov break with -traditional. 3248f5e00e24SAndrey A. Chernov * configure: Check for those features. 3249f5e00e24SAndrey A. Chernov 3250f5e00e24SAndrey A. ChernovWed Jul 10 01:39:23 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu) 3251f5e00e24SAndrey A. Chernov 3252f5e00e24SAndrey A. Chernov * configure, Makefile.in: $(INSTALLPROG) -> $(INSTALL). 3253f5e00e24SAndrey A. Chernov 3254f5e00e24SAndrey A. ChernovSat Jul 6 16:39:04 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu) 3255f5e00e24SAndrey A. Chernov 3256f5e00e24SAndrey A. Chernov * Replace Makefile with configure and Makefile.in. 3257f5e00e24SAndrey A. Chernov Update README with current compilation instructions. 3258f5e00e24SAndrey A. Chernov 3259f5e00e24SAndrey A. ChernovSat Jul 6 14:03:29 1991 Richard Stallman (rms at mole.gnu.ai.mit.edu) 3260f5e00e24SAndrey A. Chernov 3261f5e00e24SAndrey A. Chernov * util.c (setup_output): Just save the args for later use. 3262f5e00e24SAndrey A. Chernov (begin_output): Do the real work, with the values that were saved. 3263f5e00e24SAndrey A. Chernov It's safe to call begin_output more than once. 3264f5e00e24SAndrey A. Chernov Print the special headers for context format here. 3265f5e00e24SAndrey A. Chernov * analyze.c (diff_2_files): Don't print special headers here. 3266f5e00e24SAndrey A. Chernov * context.c (pr_context_hunk, pr_unidiff_hunk): Call begin_output. 3267f5e00e24SAndrey A. Chernov * ed.c (print_ed_hunk, print_forward_ed_hunk, print_rcs_hunk): 3268f5e00e24SAndrey A. Chernov * normal.c (print_normal_hunk): Likewise. 3269f5e00e24SAndrey A. Chernov * ifdef.c (print_ifdef_hunk): Likewise. 3270f5e00e24SAndrey A. Chernov * util.c (finish_output): Don't die if begin_output was not called. 3271f5e00e24SAndrey A. Chernov 3272f5e00e24SAndrey A. ChernovThu Jun 20 23:10:01 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu) 3273f5e00e24SAndrey A. Chernov 3274f5e00e24SAndrey A. Chernov * Makefile: Add TAGS, distclean, and realclean targets. 3275f5e00e24SAndrey A. Chernov Set SHELL. 3276f5e00e24SAndrey A. Chernov 3277f5e00e24SAndrey A. ChernovTue Apr 30 13:54:36 1991 Richard Stallman (rms at mole.gnu.ai.mit.edu) 3278f5e00e24SAndrey A. Chernov 3279f5e00e24SAndrey A. Chernov * diff.h (TRUE, FALSE): Undefine these before defining. 3280f5e00e24SAndrey A. Chernov 3281f5e00e24SAndrey A. ChernovThu Mar 14 18:27:27 1991 Richard Stallman (rms@mole.ai.mit.edu) 3282f5e00e24SAndrey A. Chernov 3283f5e00e24SAndrey A. Chernov * Makefile (objs): Include $(ALLOCA). 3284f5e00e24SAndrey A. Chernov 3285f5e00e24SAndrey A. ChernovSat Mar 9 22:34:03 1991 Richard Stallman (rms at mole.ai.mit.edu) 3286f5e00e24SAndrey A. Chernov 3287f5e00e24SAndrey A. Chernov * diff.h: Include regex.h. 3288f5e00e24SAndrey A. Chernov 3289f5e00e24SAndrey A. ChernovThu Feb 28 18:59:53 1991 Richard Stallman (rms at mole.ai.mit.edu) 3290f5e00e24SAndrey A. Chernov 3291f5e00e24SAndrey A. Chernov * Makefile (diff3): Link with GNU getopt. 3292f5e00e24SAndrey A. Chernov 3293f5e00e24SAndrey A. ChernovSat Feb 23 12:49:43 1991 Richard Stallman (rms at mole.ai.mit.edu) 3294f5e00e24SAndrey A. Chernov 3295f5e00e24SAndrey A. Chernov * io.c (find_equiv_class): Make hash code unsigned before mod. 3296f5e00e24SAndrey A. Chernov 3297f5e00e24SAndrey A. Chernov * diff.h (files): Add EXTERN. 3298f5e00e24SAndrey A. Chernov 3299f5e00e24SAndrey A. ChernovSun Jan 13 21:33:01 1991 Richard Stallman (rms at mole.ai.mit.edu) 3300f5e00e24SAndrey A. Chernov 3301f5e00e24SAndrey A. Chernov * diff.c: +print option renamed +paginate. Remove +all-text. 3302f5e00e24SAndrey A. Chernov 3303f5e00e24SAndrey A. ChernovMon Jan 7 06:18:01 1991 David J. MacKenzie (djm at geech.ai.mit.edu) 3304f5e00e24SAndrey A. Chernov 3305f5e00e24SAndrey A. Chernov * Makefile (dist): New target, replacing diff.tar and 3306f5e00e24SAndrey A. Chernov diff.tar.Z, to encode version number in distribution directory 3307f5e00e24SAndrey A. Chernov and tar file names. 3308f5e00e24SAndrey A. Chernov 3309f5e00e24SAndrey A. ChernovSun Jan 6 18:42:23 1991 Michael I Bushnell (mib at geech.ai.mit.edu) 3310f5e00e24SAndrey A. Chernov 3311f5e00e24SAndrey A. Chernov * Version 1.15 released. 3312f5e00e24SAndrey A. Chernov 3313f5e00e24SAndrey A. Chernov * version.c: Updated from 1.15 alpha to 1.15 3314f5e00e24SAndrey A. Chernov 3315f5e00e24SAndrey A. Chernov * context.c (print_context_number_range, 3316f5e00e24SAndrey A. Chernov print_unidiff_number_range): Don't print N,M when N=M, print 3317f5e00e24SAndrey A. Chernov just N instead. 3318f5e00e24SAndrey A. Chernov 3319f5e00e24SAndrey A. Chernov * README: Updated for version 1.15. 3320f5e00e24SAndrey A. Chernov Makefile: Updated for version 1.15. 3321f5e00e24SAndrey A. Chernov 3322f5e00e24SAndrey A. Chernov * diff3.c (main): Don't get confused if one of the arguments 3323f5e00e24SAndrey A. Chernov is a directory. 3324f5e00e24SAndrey A. Chernov 3325f5e00e24SAndrey A. Chernov * diff.c (compare_files): Don't get confused if comparing 3326f5e00e24SAndrey A. Chernov standard input to a directory; print error instead. 3327f5e00e24SAndrey A. Chernov 3328f5e00e24SAndrey A. Chernov * analyze.c (diff_2_files), context.c (print_context_header, 3329f5e00e24SAndrey A. Chernov print_context_script), diff.c (main), diff.h (enum 3330f5e00e24SAndrey A. Chernov output_style): Tread unidiff as an output style in its own 3331f5e00e24SAndrey A. Chernov right. This also generates an error when both -u and -c are 3332f5e00e24SAndrey A. Chernov given. 3333f5e00e24SAndrey A. Chernov 3334f5e00e24SAndrey A. Chernov * diff.c (main): Better error messages when regexps are bad. 3335f5e00e24SAndrey A. Chernov 3336f5e00e24SAndrey A. Chernov * diff.c (compare_files): Don't assume stdin is opened. 3337f5e00e24SAndrey A. Chernov 3338f5e00e24SAndrey A. Chernov * diff3.c (read_diff): Don't assume things about the order of 3339f5e00e24SAndrey A. Chernov descriptor assignment and closes. 3340f5e00e24SAndrey A. Chernov 3341f5e00e24SAndrey A. Chernov * util.c (setup_output): Don't assume things about the order 3342f5e00e24SAndrey A. Chernov of descriptor assignment and closes. 3343f5e00e24SAndrey A. Chernov 3344f5e00e24SAndrey A. Chernov * diff.c (compare_files): Set a flag so that closes don't 3345f5e00e24SAndrey A. Chernov happen more than once. 3346f5e00e24SAndrey A. Chernov 3347f5e00e24SAndrey A. Chernov * diff.c (main): Don't just flush stdout, do a close. That 3348f5e00e24SAndrey A. Chernov way on broken systems we can still get errors. 3349f5e00e24SAndrey A. Chernov 3350f5e00e24SAndrey A. ChernovMon Dec 24 16:24:17 1990 Richard Stallman (rms at mole.ai.mit.edu) 3351f5e00e24SAndrey A. Chernov 3352f5e00e24SAndrey A. Chernov * diff.c (usage): Use = for args of long options. 3353f5e00e24SAndrey A. Chernov 3354f5e00e24SAndrey A. ChernovMon Dec 17 18:19:20 1990 Michael I Bushnell (mib at geech.ai.mit.edu) 3355f5e00e24SAndrey A. Chernov 3356f5e00e24SAndrey A. Chernov * context.c (print_context_label): Labels were interchanged badly. 3357f5e00e24SAndrey A. Chernov 3358f5e00e24SAndrey A. Chernov * context.c (pr_unidiff_hunk): Changes to deal with files 3359f5e00e24SAndrey A. Chernov ending in incomplete lines. 3360f5e00e24SAndrey A. Chernov * util.c (print_1_line): Other half of the changes. 3361f5e00e24SAndrey A. Chernov 3362f5e00e24SAndrey A. ChernovMon Dec 3 14:23:55 1990 Richard Stallman (rms at mole.ai.mit.edu) 3363f5e00e24SAndrey A. Chernov 3364f5e00e24SAndrey A. Chernov * diff.c (longopts, usage): unidiff => unified. 3365f5e00e24SAndrey A. Chernov 3366f5e00e24SAndrey A. ChernovWed Nov 7 17:13:08 1990 Richard Stallman (rms at mole.ai.mit.edu) 3367f5e00e24SAndrey A. Chernov 3368f5e00e24SAndrey A. Chernov * analyze.c (diff_2_files): No warnings about newlines for -D. 3369f5e00e24SAndrey A. Chernov 3370f5e00e24SAndrey A. Chernov * diff.c (pr_unidiff_hunk): Remove ref to output_patch_flag. 3371f5e00e24SAndrey A. Chernov 3372f5e00e24SAndrey A. ChernovTue Oct 23 23:19:18 1990 Richard Stallman (rms at mole.ai.mit.edu) 3373f5e00e24SAndrey A. Chernov 3374f5e00e24SAndrey A. Chernov * diff.c (compare_files): For -D, compare even args are same file. 3375f5e00e24SAndrey A. Chernov * analyze.c (diff_2_files): Likewise. 3376f5e00e24SAndrey A. Chernov Also, output even if files have no differences. 3377f5e00e24SAndrey A. Chernov 3378f5e00e24SAndrey A. Chernov * analyze.c (diff_2_files): Print missing newline messages last. 3379f5e00e24SAndrey A. Chernov Return 2 if a newline is missing. 3380f5e00e24SAndrey A. Chernov Print them even if files end with identical text. 3381f5e00e24SAndrey A. Chernov 3382f5e00e24SAndrey A. ChernovMon Oct 22 19:40:09 1990 Richard Stallman (rms at mole.ai.mit.edu) 3383f5e00e24SAndrey A. Chernov 3384f5e00e24SAndrey A. Chernov * diff.c (usage): Return 2. 3385f5e00e24SAndrey A. Chernov 3386f5e00e24SAndrey A. ChernovWed Oct 10 20:54:04 1990 Richard Stallman (rms at mole.ai.mit.edu) 3387f5e00e24SAndrey A. Chernov 3388f5e00e24SAndrey A. Chernov * diff.c (longopts): Add +new-files. 3389f5e00e24SAndrey A. Chernov 3390f5e00e24SAndrey A. ChernovSun Sep 23 22:49:29 1990 Richard Stallman (rms at mole.ai.mit.edu) 3391f5e00e24SAndrey A. Chernov 3392f5e00e24SAndrey A. Chernov * context.c (print_context_script): Handle unidiff_flag. 3393f5e00e24SAndrey A. Chernov (print_context_header): Likewise. 3394f5e00e24SAndrey A. Chernov (print_unidiff_number_range, pr_unidiff_hunk): New functions. 3395f5e00e24SAndrey A. Chernov * diff.c (longopts): Add element for +unidiff. 3396f5e00e24SAndrey A. Chernov (main): Handle +unidiff and -u. 3397f5e00e24SAndrey A. Chernov (usage): Mention them. 3398f5e00e24SAndrey A. Chernov 3399f5e00e24SAndrey A. ChernovWed Sep 5 16:33:22 1990 Richard Stallman (rms at mole.ai.mit.edu) 3400f5e00e24SAndrey A. Chernov 3401f5e00e24SAndrey A. Chernov * io.c (find_and_hash_each_line): Deal with missing final newline 3402f5e00e24SAndrey A. Chernov after buffering necessary context lines. 3403f5e00e24SAndrey A. Chernov 3404f5e00e24SAndrey A. ChernovSat Sep 1 16:32:32 1990 Richard Stallman (rms at mole.ai.mit.edu) 3405f5e00e24SAndrey A. Chernov 3406f5e00e24SAndrey A. Chernov * io.c (find_identical_ends): ROBUST_OUTPUT_FORMAT test was backward. 3407f5e00e24SAndrey A. Chernov 3408f5e00e24SAndrey A. ChernovThu Aug 23 17:17:20 1990 Richard Stallman (rms at mole.ai.mit.edu) 3409f5e00e24SAndrey A. Chernov 3410f5e00e24SAndrey A. Chernov * diff3.c (WIFEXITED): Undef it if WEXITSTATUS is not defined. 3411f5e00e24SAndrey A. Chernov * context.c (find_function): Don't try to return values. 3412f5e00e24SAndrey A. Chernov 3413f5e00e24SAndrey A. ChernovWed Aug 22 11:54:39 1990 Richard Stallman (rms at mole.ai.mit.edu) 3414f5e00e24SAndrey A. Chernov 3415f5e00e24SAndrey A. Chernov * diff.h (O_RDONLY): Define if not defined. 3416f5e00e24SAndrey A. Chernov 3417f5e00e24SAndrey A. ChernovTue Aug 21 13:49:26 1990 Richard Stallman (rms at mole.ai.mit.edu) 3418f5e00e24SAndrey A. Chernov 3419f5e00e24SAndrey A. Chernov * Handle -L option. 3420f5e00e24SAndrey A. Chernov * context.c (print_context_label): New function. 3421f5e00e24SAndrey A. Chernov (print_context_header): Use that. 3422f5e00e24SAndrey A. Chernov * diff.c (main): Recognize the option. 3423f5e00e24SAndrey A. Chernov (usage): Updated. 3424f5e00e24SAndrey A. Chernov * diff.h (file_label): New variable. 3425f5e00e24SAndrey A. Chernov * diff3.c (main): Recognize -L instead of -t. 3426f5e00e24SAndrey A. Chernov 3427f5e00e24SAndrey A. Chernov * diff3.c (main): Support -m without other option. 3428f5e00e24SAndrey A. Chernov 3429f5e00e24SAndrey A. Chernov * diff3.c (WEXITSTATUS, WIFEXITED): Define whenever not defined. 3430f5e00e24SAndrey A. Chernov 3431f5e00e24SAndrey A. Chernov * diff3.c (bcopy, index, rindex): Delete definitions; not used. 3432f5e00e24SAndrey A. Chernov (D_LINENUM, D_LINELEN): Likewise. 3433f5e00e24SAndrey A. Chernov (struct diff_block): lengths includes newlines. 3434f5e00e24SAndrey A. Chernov (struct diff3_block): Likewise. 3435f5e00e24SAndrey A. Chernov (always_text, merge): New variables. 3436f5e00e24SAndrey A. Chernov (read_diff): Return address of end, not size read. Calls changed. 3437f5e00e24SAndrey A. Chernov Pass -a to diff if given to diff3. 3438f5e00e24SAndrey A. Chernov current_chunk_size now an int. Detect error in `pipe'. 3439f5e00e24SAndrey A. Chernov Check for incomplete line of output here. 3440f5e00e24SAndrey A. Chernov (scan_diff_line): Don't make scan_ptr + 2 before knowing it is valid. 3441f5e00e24SAndrey A. Chernov No need to check validity of diff output here. 3442f5e00e24SAndrey A. Chernov Include newline in length of line. 3443f5e00e24SAndrey A. Chernov (main): Compute rev_mapping here. Handle -a and -m. 3444f5e00e24SAndrey A. Chernov Error message if excess -t operands. Error for incompatible options. 3445f5e00e24SAndrey A. Chernov Error if `-' given more than once. 3446f5e00e24SAndrey A. Chernov Fix error storing in tag_strings. 3447f5e00e24SAndrey A. Chernov (output_diff3): REV_MAPPING is now an arg. Call changed. 3448f5e00e24SAndrey A. Chernov Change syntax of "missing newline" message. 3449f5e00e24SAndrey A. Chernov Expect length of line to include newline. 3450f5e00e24SAndrey A. Chernov (output_diff3_edscript): Return just 0 or 1. 3451f5e00e24SAndrey A. Chernov REV_MAPPING is now an arg. Call changed. 3452f5e00e24SAndrey A. Chernov (output_diff3_merge): New function. 3453f5e00e24SAndrey A. Chernov (process_diff): Better error message for bad diff format. 3454f5e00e24SAndrey A. Chernov (fatal, perror_with_exit): Return status 2. 3455f5e00e24SAndrey A. Chernov 3456f5e00e24SAndrey A. Chernov * analyze.c (diff_2_files): Report missing newline in either 3457f5e00e24SAndrey A. Chernov or both files, if not robust output style. 3458f5e00e24SAndrey A. Chernov 3459f5e00e24SAndrey A. Chernov * util.c (setup_output): Detect error from pipe. 3460f5e00e24SAndrey A. Chernov No need to close stdin. 3461f5e00e24SAndrey A. Chernov 3462f5e00e24SAndrey A. Chernov * util.c (print_1_line): Change format of missing-newline msg. 3463f5e00e24SAndrey A. Chernov Change if statements to switch. 3464f5e00e24SAndrey A. Chernov 3465f5e00e24SAndrey A. Chernov * io.c (slurp): Don't mention differences in final newline if -B. 3466f5e00e24SAndrey A. Chernov 3467f5e00e24SAndrey A. Chernov * io.c (binary_file_p): Use ISO char set as criterion, not ASCII. 3468f5e00e24SAndrey A. Chernov 3469f5e00e24SAndrey A. Chernov * io.c (find_identical_ends): Increase value of BEG0 by 1. 3470f5e00e24SAndrey A. Chernov Other changes in backwards scan to avoid decrementing pointers 3471f5e00e24SAndrey A. Chernov before start of array, and set LINES properly. 3472f5e00e24SAndrey A. Chernov 3473f5e00e24SAndrey A. Chernov * diff.h (ROBUST_OUTPUT_STYLE): New macro. 3474f5e00e24SAndrey A. Chernov * io.c (find_identical_ends, find_and_hash_each_line): Use that macro. 3475f5e00e24SAndrey A. Chernov 3476f5e00e24SAndrey A. Chernov * diff.h (dup2): Don't define if XENIX. 3477f5e00e24SAndrey A. Chernov 3478f5e00e24SAndrey A. Chernov * diff.c (main): Check for write error at end. 3479f5e00e24SAndrey A. Chernov 3480f5e00e24SAndrey A. Chernov * context.c (find_function): Don't return a value. 3481f5e00e24SAndrey A. Chernov Use argument FILE rather than global files. 3482f5e00e24SAndrey A. Chernov 3483f5e00e24SAndrey A. Chernov * analyze.c: Add external function declarations. 3484f5e00e24SAndrey A. Chernov * analyze.c (build_script): Turn off explicit check for final newline. 3485f5e00e24SAndrey A. Chernov 3486f5e00e24SAndrey A. Chernov * analyze.c (discard_confusing_lines): Make integers unsigned. 3487f5e00e24SAndrey A. Chernov 3488f5e00e24SAndrey A. ChernovTue Jul 31 21:37:16 1990 Richard Stallman (rms at sugar-bombs.ai.mit.edu) 3489f5e00e24SAndrey A. Chernov 3490f5e00e24SAndrey A. Chernov * io.c (find_and_hash_each_line): Correct the criterion 3491f5e00e24SAndrey A. Chernov for leaving out the newline from the end of the line. 3492f5e00e24SAndrey A. Chernov 3493f5e00e24SAndrey A. ChernovTue May 29 21:28:16 1990 Richard Stallman (rms at sugar-bombs.ai.mit.edu) 3494f5e00e24SAndrey A. Chernov 3495f5e00e24SAndrey A. Chernov * dir.c (diff_dirs): Free things only if nonzero. 3496f5e00e24SAndrey A. Chernov 3497f5e00e24SAndrey A. ChernovMon Apr 16 18:31:05 1990 Richard Stallman (rms at sugar-bombs.ai.mit.edu) 3498f5e00e24SAndrey A. Chernov 3499f5e00e24SAndrey A. Chernov * diff.h (NDIR_IN_SYS): New macro controls location of ndir.h. 3500f5e00e24SAndrey A. Chernov 3501f5e00e24SAndrey A. Chernov * diff3.c (xmalloc, xrealloc): Don't die if size == 0 returns 0. 3502f5e00e24SAndrey A. Chernov 3503f5e00e24SAndrey A. ChernovSun Mar 25 15:58:42 1990 Richard Stallman (rms at sugar-bombs.ai.mit.edu) 3504f5e00e24SAndrey A. Chernov 3505f5e00e24SAndrey A. Chernov * analyze.c (discard_confusing_lines): 3506f5e00e24SAndrey A. Chernov `many' wasn't being used; use it. 350718fd37a7SXin LI Canceling provisionals near start of run must handle already 350818fd37a7SXin LI canceled provisionals. 350918fd37a7SXin LI Canceling subruns of provisionals was canceling last nonprovisional. 3510f5e00e24SAndrey A. Chernov 3511f5e00e24SAndrey A. ChernovSat Mar 24 14:02:51 1990 Richard Stallman (rms at sugar-bombs.ai.mit.edu) 3512f5e00e24SAndrey A. Chernov 3513f5e00e24SAndrey A. Chernov * analyze.c (discard_confusing_lines): 3514f5e00e24SAndrey A. Chernov Threshold for line occurring many times scales by square root 3515f5e00e24SAndrey A. Chernov of total lines. 3516f5e00e24SAndrey A. Chernov Within each run, cancel any long subrun of provisionals. 351718fd37a7SXin LI Don't update `provisional' while canceling provisionals. 3518f5e00e24SAndrey A. Chernov In big outer loop, handle provisional and nonprovisional separately. 3519f5e00e24SAndrey A. Chernov 3520f5e00e24SAndrey A. ChernovThu Mar 22 16:35:33 1990 Richard Stallman (rms at sugar-bombs.ai.mit.edu) 3521f5e00e24SAndrey A. Chernov 3522f5e00e24SAndrey A. Chernov * analyze.c (discard_confusing_lines): 3523f5e00e24SAndrey A. Chernov The first loops to discard provisionals from ends failed to step. 3524f5e00e24SAndrey A. Chernov In second such loops, keep discarding all consecutive provisionals. 3525f5e00e24SAndrey A. Chernov Increase threshold for stopping discarding, and also check for 3526f5e00e24SAndrey A. Chernov consecutive nondiscardables as separate threshold. 3527f5e00e24SAndrey A. Chernov 3528f5e00e24SAndrey A. ChernovFri Mar 16 00:33:08 1990 Richard Stallman (rms at sugar-bombs.ai.mit.edu) 3529f5e00e24SAndrey A. Chernov 3530f5e00e24SAndrey A. Chernov * diff3.c (read_diff): Pass -- as first arg to diff. 3531f5e00e24SAndrey A. Chernov 3532f5e00e24SAndrey A. Chernov * diff3.c: Include wait.h or define equivalent macros. 3533f5e00e24SAndrey A. Chernov (read_diff): Don't use stdio printing error in the inferior. 3534f5e00e24SAndrey A. Chernov Remember the pid and wait for it. Report failing status. 3535f5e00e24SAndrey A. Chernov Report failure of vfork. 3536f5e00e24SAndrey A. Chernov 3537f5e00e24SAndrey A. ChernovSun Mar 11 17:10:32 1990 Richard Stallman (rms at sugar-bombs.ai.mit.edu) 3538f5e00e24SAndrey A. Chernov 3539f5e00e24SAndrey A. Chernov * diff3.c (main): Accept -t options and pass to output_diff3_edscript. 3540f5e00e24SAndrey A. Chernov (usage): Mention -t. 3541f5e00e24SAndrey A. Chernov (read_diff): Use vfork. 3542f5e00e24SAndrey A. Chernov (vfork): Don't use it on Sparc. 3543f5e00e24SAndrey A. Chernov 3544f5e00e24SAndrey A. Chernov * diff.h (vfork): Don't use it on Sparc. 3545f5e00e24SAndrey A. Chernov 3546f5e00e24SAndrey A. ChernovTue Mar 6 22:37:20 1990 Richard Stallman (rms at sugar-bombs.ai.mit.edu) 3547f5e00e24SAndrey A. Chernov 3548f5e00e24SAndrey A. Chernov * diff3.c (dup2): Don't define on Xenix. 3549f5e00e24SAndrey A. Chernov 3550f5e00e24SAndrey A. Chernov * Makefile: Comments for Xenix. 3551f5e00e24SAndrey A. Chernov 3552f5e00e24SAndrey A. ChernovThu Mar 1 17:19:23 1990 Richard Stallman (rms at sugar-bombs.ai.mit.edu) 3553f5e00e24SAndrey A. Chernov 3554f5e00e24SAndrey A. Chernov * analyze.c (diff_2_files): `message' requires three args. 3555f5e00e24SAndrey A. Chernov 3556f5e00e24SAndrey A. ChernovFri Feb 23 10:56:50 1990 David J. MacKenzie (djm at albert.ai.mit.edu) 3557f5e00e24SAndrey A. Chernov 3558f5e00e24SAndrey A. Chernov * diff.h, util.c, diff3.c: Change 'void *' to 'VOID *', with 3559f5e00e24SAndrey A. Chernov VOID defined as void if __STDC__, char if not. 3560f5e00e24SAndrey A. Chernov 3561f5e00e24SAndrey A. ChernovSun Feb 18 20:31:58 1990 David J. MacKenzie (djm at albert.ai.mit.edu) 3562f5e00e24SAndrey A. Chernov 3563f5e00e24SAndrey A. Chernov * Makefile: Add rules for getopt.c, getopt1.c, getopt.h. 3564f5e00e24SAndrey A. Chernov 3565f5e00e24SAndrey A. Chernov * getopt.c, getopt.h, getopt1.c: New files. 3566f5e00e24SAndrey A. Chernov 3567f5e00e24SAndrey A. Chernov * main.c (main, usage): Add long options. 3568f5e00e24SAndrey A. Chernov 3569f5e00e24SAndrey A. Chernov * analyze.c (shift_boundaries): Remove unused var 'j_end'. 3570f5e00e24SAndrey A. Chernov 3571f5e00e24SAndrey A. ChernovThu Feb 8 02:43:16 1990 Jim Kingdon (kingdon at pogo.ai.mit.edu) 3572f5e00e24SAndrey A. Chernov 3573f5e00e24SAndrey A. Chernov * GNUmakefile: include ../Makerules before Makefile. 3574f5e00e24SAndrey A. Chernov 3575f5e00e24SAndrey A. ChernovFri Feb 2 23:21:38 1990 Richard Stallman (rms at sugar-bombs.ai.mit.edu) 3576f5e00e24SAndrey A. Chernov 357718fd37a7SXin LI * analyze.c (diff_2_files): If -B or -I, don't return 1 3578f5e00e24SAndrey A. Chernov if all changes were ignored. 3579f5e00e24SAndrey A. Chernov 3580f5e00e24SAndrey A. ChernovWed Jan 24 20:43:57 1990 Richard Stallman (rms at albert.ai.mit.edu) 3581f5e00e24SAndrey A. Chernov 3582f5e00e24SAndrey A. Chernov * diff3.c (fatal): Output to stderr. 3583f5e00e24SAndrey A. Chernov 3584f5e00e24SAndrey A. ChernovThu Jan 11 00:25:56 1990 David J. MacKenzie (djm at hobbes.ai.mit.edu) 3585f5e00e24SAndrey A. Chernov 3586f5e00e24SAndrey A. Chernov * diff.c (usage): Mention -v. 3587f5e00e24SAndrey A. Chernov 3588f5e00e24SAndrey A. ChernovWed Jan 10 16:06:38 1990 Richard Stallman (rms at sugar-bombs.ai.mit.edu) 3589f5e00e24SAndrey A. Chernov 3590f5e00e24SAndrey A. Chernov * diff3.c (output_diff3_edscript): Return number of overlaps. 3591f5e00e24SAndrey A. Chernov (main): If have overlaps, exit with status 1. 3592f5e00e24SAndrey A. Chernov 3593f5e00e24SAndrey A. ChernovSun Dec 24 10:29:20 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu) 3594f5e00e24SAndrey A. Chernov 3595f5e00e24SAndrey A. Chernov * io.c (find_equiv_class): Fix typo that came from changing init of B 359618fd37a7SXin LI to an assignment. 3597f5e00e24SAndrey A. Chernov 3598f5e00e24SAndrey A. Chernov * version.c: New file. 3599f5e00e24SAndrey A. Chernov * diff.c (main): -v prints version number. 3600f5e00e24SAndrey A. Chernov 3601f5e00e24SAndrey A. Chernov * io.c (binary_file_p): Null char implies binary file. 3602f5e00e24SAndrey A. Chernov 3603f5e00e24SAndrey A. ChernovFri Nov 17 23:44:55 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu) 3604f5e00e24SAndrey A. Chernov 3605f5e00e24SAndrey A. Chernov * util.c (print_1_line): Fix off by 1 error. 3606f5e00e24SAndrey A. Chernov 3607f5e00e24SAndrey A. ChernovThu Nov 16 13:51:10 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu) 3608f5e00e24SAndrey A. Chernov 3609f5e00e24SAndrey A. Chernov * util.c (xcalloc): Function deleted. 3610f5e00e24SAndrey A. Chernov 3611f5e00e24SAndrey A. Chernov * io.c (slurp): Null-terminate the buffer. 3612f5e00e24SAndrey A. Chernov 3613f5e00e24SAndrey A. Chernov * io.c (read_files): Delete unused vars. 3614f5e00e24SAndrey A. Chernov 3615f5e00e24SAndrey A. Chernov * io.c (find_equiv_class): Don't index by N if too low. 3616f5e00e24SAndrey A. Chernov 3617f5e00e24SAndrey A. Chernov * dir.c (dir_sort): Delete the extra declaration of compare_names. 3618f5e00e24SAndrey A. Chernov 3619f5e00e24SAndrey A. Chernov * diff.h: Don't declare xcalloc. Declare some other functions. 3620f5e00e24SAndrey A. Chernov 3621f5e00e24SAndrey A. Chernov * analyze.c (shift_boundaries): 3622f5e00e24SAndrey A. Chernov Test for END at end of range before indexing by it. 362318fd37a7SXin LI Fix misspelling of `preceding' in var names. 3624f5e00e24SAndrey A. Chernov 3625f5e00e24SAndrey A. ChernovSat Nov 11 14:04:16 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu) 3626f5e00e24SAndrey A. Chernov 3627f5e00e24SAndrey A. Chernov * diff3.c (using_to_diff3_block): Delete unused vars. 3628f5e00e24SAndrey A. Chernov (make_3way_diff, process_diff_control, read_diff, output_diff3): Likewise. 3629f5e00e24SAndrey A. Chernov 3630f5e00e24SAndrey A. ChernovMon Nov 6 18:15:50 EST 1989 Jay Fenlason (hack@ai.mit.edu) 3631f5e00e24SAndrey A. Chernov 3632f5e00e24SAndrey A. Chernov * README Fix typo. 3633f5e00e24SAndrey A. Chernov 3634f5e00e24SAndrey A. ChernovFri Nov 3 15:27:47 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu) 3635f5e00e24SAndrey A. Chernov 3636f5e00e24SAndrey A. Chernov * diff.c (usage): Mention -D. 3637f5e00e24SAndrey A. Chernov 3638f5e00e24SAndrey A. Chernov * ifdef.c (print_ifdef_hunk): Write comments on #else and #endif. 3639f5e00e24SAndrey A. Chernov 3640f5e00e24SAndrey A. ChernovSun Oct 29 16:41:07 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu) 3641f5e00e24SAndrey A. Chernov 3642f5e00e24SAndrey A. Chernov * diff.c (compare_files): Don't fflush for identical files. 3643f5e00e24SAndrey A. Chernov 3644f5e00e24SAndrey A. ChernovWed Oct 25 17:57:12 1989 Randy Smith (randy at apple-gunkies.ai.mit.edu) 3645f5e00e24SAndrey A. Chernov 3646f5e00e24SAndrey A. Chernov * diff3.c (using_to_diff3_block): When defaulting lines from 3647f5e00e24SAndrey A. Chernov FILE0, only copy up to just under the *lowest* line mentioned 3648f5e00e24SAndrey A. Chernov in the next diff. 3649f5e00e24SAndrey A. Chernov 3650f5e00e24SAndrey A. Chernov * diff3.c (fatal): Add \n to error messages. 3651f5e00e24SAndrey A. Chernov 3652f5e00e24SAndrey A. ChernovWed Oct 25 15:05:49 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu) 3653f5e00e24SAndrey A. Chernov 3654f5e00e24SAndrey A. Chernov * Makefile (tapefiles): Add ChangeLog. 3655f5e00e24SAndrey A. Chernov 3656f5e00e24SAndrey A. ChernovTue Oct 3 00:51:17 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu) 3657f5e00e24SAndrey A. Chernov 3658f5e00e24SAndrey A. Chernov * diff3.c (process_diff, create_diff3_block): Init ->next field. 3659f5e00e24SAndrey A. Chernov 3660f5e00e24SAndrey A. ChernovFri Sep 29 08:16:45 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu) 3661f5e00e24SAndrey A. Chernov 3662f5e00e24SAndrey A. Chernov * util.c (line_cmp): Alter end char of line 2, not line 1. 3663f5e00e24SAndrey A. Chernov 3664f5e00e24SAndrey A. ChernovWed Sep 20 00:12:37 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu) 3665f5e00e24SAndrey A. Chernov 3666f5e00e24SAndrey A. Chernov * Makefile (diff.tar): Expect ln to fail on some files; 3667f5e00e24SAndrey A. Chernov copy them with cp. 3668f5e00e24SAndrey A. Chernov 3669f5e00e24SAndrey A. ChernovMon Sep 18 02:54:29 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu) 3670f5e00e24SAndrey A. Chernov 3671f5e00e24SAndrey A. Chernov * Handle -D option: 3672f5e00e24SAndrey A. Chernov * io.c (find_and_hash_each_line): Keep all lines of 1st file. 3673f5e00e24SAndrey A. Chernov * diff.c (main): Handle -D option. 3674f5e00e24SAndrey A. Chernov (compare_files): Reject -D if files spec'd are directories. 3675f5e00e24SAndrey A. Chernov * analyze.c (diff_2_files): Handle OUTPUT_IFDEF case. 3676f5e00e24SAndrey A. Chernov 3677f5e00e24SAndrey A. ChernovFri Sep 1 20:15:50 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu) 3678f5e00e24SAndrey A. Chernov 3679f5e00e24SAndrey A. Chernov * diff.c (option_list): Rename arg VECTOR as OPTIONVEC. 3680f5e00e24SAndrey A. Chernov 3681f5e00e24SAndrey A. ChernovMon Aug 28 17:58:27 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu) 3682f5e00e24SAndrey A. Chernov 3683f5e00e24SAndrey A. Chernov * diff.c (compare_files): Clear entire inf[i].stat. 3684f5e00e24SAndrey A. Chernov 3685f5e00e24SAndrey A. ChernovWed Aug 23 17:48:47 1989 Richard Stallman (rms at apple-gunkies.ai.mit.edu) 3686f5e00e24SAndrey A. Chernov 3687f5e00e24SAndrey A. Chernov * io.c (find_identical_ends): Sign was backward 3688f5e00e24SAndrey A. Chernov determining where to bound the scan for the suffix. 3689f5e00e24SAndrey A. Chernov 3690f5e00e24SAndrey A. ChernovWed Aug 16 12:49:16 1989 Richard Stallman (rms at hobbes.ai.mit.edu) 3691f5e00e24SAndrey A. Chernov 3692f5e00e24SAndrey A. Chernov * analyze.c (diff_2_files): If -q, treat all files as binary. 3693f5e00e24SAndrey A. Chernov * diff.c (main): Detect -q, record in no_details_flag. 3694f5e00e24SAndrey A. Chernov 3695f5e00e24SAndrey A. ChernovSun Jul 30 23:12:00 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu) 3696f5e00e24SAndrey A. Chernov 3697f5e00e24SAndrey A. Chernov * diff.c (usage): New function. 3698f5e00e24SAndrey A. Chernov (main): Call it. 3699f5e00e24SAndrey A. Chernov 3700f5e00e24SAndrey A. ChernovWed Jul 26 02:02:19 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu) 3701f5e00e24SAndrey A. Chernov 3702f5e00e24SAndrey A. Chernov * diff.c (main): Make -C imply -c. 3703f5e00e24SAndrey A. Chernov 3704f5e00e24SAndrey A. ChernovThu Jul 20 17:57:51 1989 Chris Hanson (cph at kleph) 3705f5e00e24SAndrey A. Chernov 3706f5e00e24SAndrey A. Chernov * io.c (find_and_hash_each_line): Bug fix in context handling, 3707f5e00e24SAndrey A. Chernov introduced by last change. 3708f5e00e24SAndrey A. Chernov 3709f5e00e24SAndrey A. ChernovFri Jul 14 17:39:20 1989 Chris Hanson (cph at kleph) 3710f5e00e24SAndrey A. Chernov 3711f5e00e24SAndrey A. Chernov * analyze.c: To make RCS work correctly on files that don't 3712f5e00e24SAndrey A. Chernov necessarily end in newline, introduce some changes that cause 3713f5e00e24SAndrey A. Chernov diffs to be sensitive to missing final newline. Because 3714f5e00e24SAndrey A. Chernov non-RCS modes don't want to be affected by these changes, they 3715f5e00e24SAndrey A. Chernov are conditional on `output_style == OUTPUT_RCS'. 3716f5e00e24SAndrey A. Chernov (diff_2_files) [OUTPUT_RCS]: Suppress the "File X missing 3717f5e00e24SAndrey A. Chernov newline" message. 3718f5e00e24SAndrey A. Chernov (build_script) [OUTPUT_RCS]: Cause the last line to compare as 3719f5e00e24SAndrey A. Chernov different if exactly one of the files is missing its final 3720f5e00e24SAndrey A. Chernov newline. 3721f5e00e24SAndrey A. Chernov 3722f5e00e24SAndrey A. Chernov * io.c (find_and_hash_each_line): Bug fix in 3723f5e00e24SAndrey A. Chernov ignore_space_change mode. Change line's length to include the 3724f5e00e24SAndrey A. Chernov newline. For OUTPUT_RCS, decrement last line's length if 3725f5e00e24SAndrey A. Chernov there is no final newline. 3726f5e00e24SAndrey A. Chernov (find_identical_ends) [OUTPUT_RCS]: If one of the files is 3727f5e00e24SAndrey A. Chernov missing a final newline, make sure it's not included in either 3728f5e00e24SAndrey A. Chernov the prefix or suffix. 3729f5e00e24SAndrey A. Chernov 3730f5e00e24SAndrey A. Chernov * util.c (print_1_line): Change line output routine to account 3731f5e00e24SAndrey A. Chernov for line length including the newline. 3732f5e00e24SAndrey A. Chernov 3733f5e00e24SAndrey A. ChernovTue Jun 27 02:35:28 1989 Roland McGrath (roland at hobbes.ai.mit.edu) 3734f5e00e24SAndrey A. Chernov 3735f5e00e24SAndrey A. Chernov * Makefile: Inserted $(archpfx) where appropriate. 3736f5e00e24SAndrey A. Chernov 3737f5e00e24SAndrey A. ChernovWed May 17 20:18:43 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu) 3738f5e00e24SAndrey A. Chernov 3739f5e00e24SAndrey A. Chernov * diff3.c [USG]: Include fcntl.h. 3740f5e00e24SAndrey A. Chernov 3741f5e00e24SAndrey A. Chernov * diff.h [USG]: New compilation flags HAVE_NDIR, HAVE_DIRECT. 3742f5e00e24SAndrey A. Chernov 3743f5e00e24SAndrey A. ChernovWed Apr 26 15:35:57 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu) 3744f5e00e24SAndrey A. Chernov 3745f5e00e24SAndrey A. Chernov * dir.c (diff_dirs): Two new args, NONEX1 and NONEX2, say to pretend 3746f5e00e24SAndrey A. Chernov nonex dirs are empty. 3747f5e00e24SAndrey A. Chernov (dir_sort): New arg NONEX, likewise. 3748f5e00e24SAndrey A. Chernov * diff.c (compare_files): Pass those args. 3749f5e00e24SAndrey A. Chernov Sometimes call diff_dirs if subdir exists in just one place. 3750f5e00e24SAndrey A. Chernov 3751f5e00e24SAndrey A. ChernovWed Apr 12 01:10:27 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu) 3752f5e00e24SAndrey A. Chernov 3753f5e00e24SAndrey A. Chernov * io.c (find_identical_ends): Set END0 *after* last char 3754f5e00e24SAndrey A. Chernov during backward scan for suffix. 3755f5e00e24SAndrey A. Chernov 3756f5e00e24SAndrey A. ChernovSat Apr 8 15:49:49 1989 Randall Smith (randy at apple-gunkies.ai.mit.edu) 3757f5e00e24SAndrey A. Chernov 3758f5e00e24SAndrey A. Chernov * diff3.c (using_to_diff3_block): Now find high marks in files 1 3759f5e00e24SAndrey A. Chernov and 2 through mapping off of the last difference instead of the 3760f5e00e24SAndrey A. Chernov first. 3761f5e00e24SAndrey A. Chernov 3762f5e00e24SAndrey A. Chernov * diff3.c: Many trivial changes to spelling inside comments. 3763f5e00e24SAndrey A. Chernov 3764f5e00e24SAndrey A. ChernovFri Feb 24 12:38:03 1989 Randall Smith (randy at gluteus.ai.mit.edu) 3765f5e00e24SAndrey A. Chernov 3766f5e00e24SAndrey A. Chernov * util.c, normal.c, io.c, ed.c, dir.c, diff.h, diff.c, context.c, 3767f5e00e24SAndrey A. Chernov analyze.c, Makefile: Changed copyright header to conform with new 3768f5e00e24SAndrey A. Chernov GNU General Public license. 3769f5e00e24SAndrey A. Chernov * diff3.c: Changed copyright header to conform with new GNU 3770f5e00e24SAndrey A. Chernov General Public license. 3771f5e00e24SAndrey A. Chernov * COPYING: Made a hard link to /gp/rms/COPYING. 3772f5e00e24SAndrey A. Chernov 3773f5e00e24SAndrey A. ChernovFri Feb 24 10:01:58 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu) 3774f5e00e24SAndrey A. Chernov 3775f5e00e24SAndrey A. Chernov * io.c (slurp): Leave 2 chars space at end of buffer, not one. 3776f5e00e24SAndrey A. Chernov (find_identical_ends): Special case if either file is empty; 3777f5e00e24SAndrey A. Chernov don't try to make a sentinel since could crash. 3778f5e00e24SAndrey A. Chernov 3779f5e00e24SAndrey A. ChernovWed Feb 15 14:24:48 1989 Jay Fenlason (hack at apple-gunkies.ai.mit.edu) 3780f5e00e24SAndrey A. Chernov 3781f5e00e24SAndrey A. Chernov * diff3.c (message) Re-wrote routine to avoid using alloca() 3782f5e00e24SAndrey A. Chernov 3783f5e00e24SAndrey A. ChernovWed Feb 15 06:19:14 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu) 3784f5e00e24SAndrey A. Chernov 3785f5e00e24SAndrey A. Chernov * io.c (find_identical_ends): Delete the variable `bytes'. 3786f5e00e24SAndrey A. Chernov 3787f5e00e24SAndrey A. ChernovSun Feb 12 11:50:36 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu) 3788f5e00e24SAndrey A. Chernov 3789f5e00e24SAndrey A. Chernov * io.c (slurp): ->bufsize is nominal amount we have room for; 3790f5e00e24SAndrey A. Chernov add room for sentinel when calling xmalloc or xrealloc. 3791f5e00e24SAndrey A. Chernov 3792f5e00e24SAndrey A. Chernov * io.c (find_identical_ends): Do need overrun check in finding suffix. 3793f5e00e24SAndrey A. Chernov 3794f5e00e24SAndrey A. ChernovFri Feb 10 01:28:15 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu) 3795f5e00e24SAndrey A. Chernov 3796f5e00e24SAndrey A. Chernov * diff.c (main): -C now takes arg to specify context length. 3797f5e00e24SAndrey A. Chernov Now -p to show C function name--Damned IEEE! 3798f5e00e24SAndrey A. Chernov Fatal error if context length spec'd twice. 3799f5e00e24SAndrey A. Chernov 3800f5e00e24SAndrey A. Chernov * ed.c (print_ed_hunk): Now special treatment only for lines containing 3801f5e00e24SAndrey A. Chernov precisely a dot and nothing else. Output `..', end the insert, 3802f5e00e24SAndrey A. Chernov substitute that one line, then resume the insert if nec. 3803f5e00e24SAndrey A. Chernov 3804f5e00e24SAndrey A. Chernov * io.c (find_and_hash_lines): When backing up over starting context, 3805f5e00e24SAndrey A. Chernov don't move past buffer-beg. 3806f5e00e24SAndrey A. Chernov 3807f5e00e24SAndrey A. Chernov * io.c (find_identical_ends): Use sentinels to make the loops faster. 3808f5e00e24SAndrey A. Chernov If files are identical, skip the 2nd loop and return quickly. 3809f5e00e24SAndrey A. Chernov (slurp): Leave 1 char extra space after each buffer. 3810f5e00e24SAndrey A. Chernov 3811f5e00e24SAndrey A. Chernov * analyze.c (diff_2_files): Mention difference in final newlines. 3812f5e00e24SAndrey A. Chernov 3813f5e00e24SAndrey A. ChernovWed Jan 25 22:44:44 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu) 3814f5e00e24SAndrey A. Chernov 3815f5e00e24SAndrey A. Chernov * dir.c (diff_dirs): Use * when calling fcn ptr variable. 3816f5e00e24SAndrey A. Chernov 3817f5e00e24SAndrey A. ChernovSat Dec 17 14:12:06 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) 3818f5e00e24SAndrey A. Chernov 3819f5e00e24SAndrey A. Chernov * Makefile: New vars INSTALL and LIBS used in some rules; 3820f5e00e24SAndrey A. Chernov provide default defns plus commented-put defns for sysV. 3821f5e00e24SAndrey A. Chernov 3822f5e00e24SAndrey A. ChernovThu Nov 17 16:42:53 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) 3823f5e00e24SAndrey A. Chernov 3824f5e00e24SAndrey A. Chernov * dir.c (dir_sort): Open-trouble not fatal; just say # files is -1. 3825f5e00e24SAndrey A. Chernov (diff_dirs): If dir_sort does that, give up and return 2. 3826f5e00e24SAndrey A. Chernov 3827f5e00e24SAndrey A. Chernov * diff.c (compare_files): Don't open directories. 3828f5e00e24SAndrey A. Chernov Don't close them specially either. 3829f5e00e24SAndrey A. Chernov Cross-propagate inf[i].dir_p sooner. 3830f5e00e24SAndrey A. Chernov 3831f5e00e24SAndrey A. ChernovSun Nov 13 11:19:36 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) 3832f5e00e24SAndrey A. Chernov 3833f5e00e24SAndrey A. Chernov * diff.h: Declare index, rindex. 3834f5e00e24SAndrey A. Chernov 3835f5e00e24SAndrey A. Chernov * diff.c (compare_files): If comparing foodir with b/f, 3836f5e00e24SAndrey A. Chernov use foodir/f, not foodir/b/f. 3837f5e00e24SAndrey A. Chernov 3838f5e00e24SAndrey A. Chernov * diff.c (compare_files): Don't print "are identical" msg for 2 dirs. 3839f5e00e24SAndrey A. Chernov Status now 1 if one file is a dir and the other isn't, etc. 3840f5e00e24SAndrey A. Chernov 3841f5e00e24SAndrey A. ChernovThu Nov 3 16:30:24 1988 Randall Smith (randy at gluteus.ai.mit.edu) 3842f5e00e24SAndrey A. Chernov 3843f5e00e24SAndrey A. Chernov * Makefile: Added a define for diff3 to define DIFF_PROGRAM. 3844f5e00e24SAndrey A. Chernov 3845f5e00e24SAndrey A. Chernov * util.c: Added hack to make sure that perror was not called with 3846f5e00e24SAndrey A. Chernov a null pointer. 3847f5e00e24SAndrey A. Chernov 3848f5e00e24SAndrey A. Chernov * diff.c: Changed S_IFDIR to S_IFMT in masking type of file bits 3849f5e00e24SAndrey A. Chernov out. 3850f5e00e24SAndrey A. Chernov 3851f5e00e24SAndrey A. Chernov * diff3.c: Included USG compatibility defines. 3852f5e00e24SAndrey A. Chernov 3853f5e00e24SAndrey A. Chernov * diff.h: Moved sys/file.h into #else USG section (not needed or 3854f5e00e24SAndrey A. Chernov wanted on System V). 3855f5e00e24SAndrey A. Chernov 3856f5e00e24SAndrey A. Chernov * ed.c, analyze.c, context.c: Shortened names to 12 characters for 3857f5e00e24SAndrey A. Chernov the sake of System V (too simple not to do). 385818fd37a7SXin LI 385918fd37a7SXin LI 386018fd37a7SXin LICopyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1997, 1998, 1999, 386118fd37a7SXin LI2000, 2001, 2002 Free Software Foundation, Inc. 386218fd37a7SXin LI 386318fd37a7SXin LIThis file is part of GNU Diffutils. 386418fd37a7SXin LI 386518fd37a7SXin LIThis program is free software; you can redistribute it and/or modify 386618fd37a7SXin LIit under the terms of the GNU General Public License as published by 386718fd37a7SXin LIthe Free Software Foundation; either version 2, or (at your option) 386818fd37a7SXin LIany later version. 386918fd37a7SXin LI 387018fd37a7SXin LIThis program is distributed in the hope that they will be useful, 387118fd37a7SXin LIbut WITHOUT ANY WARRANTY; without even the implied warranty of 387218fd37a7SXin LIMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 387318fd37a7SXin LIGNU General Public License for more details. 387418fd37a7SXin LI 387518fd37a7SXin LIYou should have received a copy of the GNU General Public License 387618fd37a7SXin LIalong with this program; see the file COPYING. If not, write to 387718fd37a7SXin LIthe Free Software Foundation, Inc., 59 Temple Place - Suite 330, 387818fd37a7SXin LIBoston, MA 02111-1307, USA. 3879