xref: /freebsd-src/contrib/diff/ChangeLog (revision 18fd37a72c3a7549d2d4f6c6ea00bdcd2bdaca01)
1*18fd37a7SXin LI2004-04-13  Paul Eggert  <eggert@twinsun.com>
2*18fd37a7SXin LI
3*18fd37a7SXin LI	* NEWS, configure.ac (AC_INIT): Version 2.8.7.
4*18fd37a7SXin LI	* configure.ac (AM_GNU_GETTEXT_VERSION): Add.
5*18fd37a7SXin LI	(XGETTEXT): Restore from pre-2004-04-12 version.  This fixes
6*18fd37a7SXin LI	a bug that lost many msgids in doc/diffutils.pot.
7*18fd37a7SXin LI	* bootstrap: New file.
8*18fd37a7SXin LI	* exgettext: Don't generate a temporary file, as this runs afoul
9*18fd37a7SXin LI	of "make distcheck" which operates with read-only directories.
10*18fd37a7SXin LI	* Makefile.am (EXTRA_DIST): Add bootstrap.
11*18fd37a7SXin LI	Remove config/config.rpath as it is deduced automatically these days.
12*18fd37a7SXin LI
13*18fd37a7SXin LI2004-04-12  Paul Eggert  <eggert@twinsun.com>
14*18fd37a7SXin LI
15*18fd37a7SXin LI	* NEWS, configure.ac (AC_INIT): Version 2.8.6.
16*18fd37a7SXin LI
17*18fd37a7SXin LI	* NEWS: Add news for 2.8.4, 2.8.6.
18*18fd37a7SXin LI
19*18fd37a7SXin LI	* README: Move copyright notice to end.  Defer to "configure
20*18fd37a7SXin LI	--help" for special "configure" options.  Suggest latest libiconv.
21*18fd37a7SXin LI	Update version numbers of Autoconf etc. to current.
22*18fd37a7SXin LI
23*18fd37a7SXin LI	* configure.ac: Quote various arguments better.
24*18fd37a7SXin LI	(AC_CONFIG_MACRO_DIR): Add call, specifying "m4".
25*18fd37a7SXin LI	(AC_CONFIG_HEADER): Replaces AM_CONFIG_HEADER.
26*18fd37a7SXin LI	(gl_USE_SYSTEM_EXTENSIONS): Replaces AC_GNU_SOURCE.
27*18fd37a7SXin LI	(AC_ISC_POSIX): Remove; nobody ports to ancient ISC any more.
28*18fd37a7SXin LI	(AC_PROG_CPP, AC_PROG_INSTALL, AC_C_INLINE,
29*18fd37a7SXin LI	AC_HEADER_STDBOOL, AC_HEADER_STDC, AM_GNU_GETTEXT, XGETTEXT,
30*18fd37a7SXin LI	AC_HEADER_STAT, AC_FUNC_VPRINTF, jm_FUNC_GLIBC_UNLOCKED_IO,
31*18fd37a7SXin LI	jm_FUNC_GNU_STRFTIME, jm_FUNC_MALLOC, jm_FUNC_REALLOC,
32*18fd37a7SXin LI	jm_PREREQ_C_STACK, jm_PREREQ_ERROR, jm_PREREQ_HARD_LOCALE,
33*18fd37a7SXin LI	jm_PREREQ_QUOTEARG, jm_PREREQ_REGEX, AC_FUNC_FNMATCH_GNU, jm_AC_DOS):
34*18fd37a7SXin LI	Remove; not needed here, as our files don't use them directly
35*18fd37a7SXin LI	or we rely on gnulib modules.
36*18fd37a7SXin LI	(AC_C_CONST): Remove; we assume C89 now.
37*18fd37a7SXin LI	(AC_CHECK_HEADERS): Remove libintl.h, limits.h, stdlib.h, string.h,
38*18fd37a7SXin LI	time.h.
39*18fd37a7SXin LI	(AC_CHECK_TYPE): Remove ptrdiff_t, ssize_t.
40*18fd37a7SXin LI	(AC_CHECK_FUNCS): Remove diraccess, strchr, strerror, tmpnam).
41*18fd37a7SXin LI	(AC_REPLACE_FUNCS): Remove memchr, mkstemp, strcasecmp.
42*18fd37a7SXin LI	(GNULIB_AUTOCONF_SNIPPET): Add call.  This replaces much of
43*18fd37a7SXin LI	the above.
44*18fd37a7SXin LI	(AC_CONFIG_FILES): Remove lib/posix/Makefile.
45*18fd37a7SXin LI	(AC_CONFIG_COMMANDS): Remove.
46*18fd37a7SXin LI
47*18fd37a7SXin LI	* doc/diff.texi (dircategory): Change to "Text creation and
48*18fd37a7SXin LI	manipulation" from "GNU packages".
49*18fd37a7SXin LI	(Translations): New node.
50*18fd37a7SXin LI	(Overview): Improve quality of algorithm citations.
51*18fd37a7SXin LI	(Binary): -q doesn't exactly cause diff to assume files are binary.
52*18fd37a7SXin LI	(Normal): Place after Side by Side, since it's less important.
53*18fd37a7SXin LI	(Detailed Context, Detailed Unified, Detailed ed,
54*18fd37a7SXin LI	Detailed if-then-else, diff3 Hunks, Detailed diff3 Normal):
55*18fd37a7SXin LI	Place at end of menu.
56*18fd37a7SXin LI	(Detailed Unified): Mention that fractional timestamps are
57*18fd37a7SXin LI	omitted on hosts that don't support them.
58*18fd37a7SXin LI	Mention what happens when hunks contain just one line.
59*18fd37a7SXin LI	(Line Group Formats, Reject Names): Fix duplicate-word typos.
60*18fd37a7SXin LI	(Comparing Directories): Trailing white space and empty lines are
61*18fd37a7SXin LI	ignored in the -X file.
62*18fd37a7SXin LI	(diff Options): Add --strip-trailing-cr.
63*18fd37a7SXin LI	(Projects): gnu -> gvc@gnu.org.
64*18fd37a7SXin LI
65*18fd37a7SXin LI	* lib/Makefile.am (SUBDIRS): Remove.
66*18fd37a7SXin LI	(EXTRA_DIST, noinst_HEADERS): Remove most entries.
67*18fd37a7SXin LI	(libdiffutils_a_SOURCES): Now just lib_SOURCES.
68*18fd37a7SXin LI	(lib_SOURCES): New macro.
69*18fd37a7SXin LI	(DISTCLEANFILES, MOSTLYCLEANFILES): Set to empty now.
70*18fd37a7SXin LI	(gnulib.mk): Include: this does most of the work eliminated
71*18fd37a7SXin LI	by the above changes.
72*18fd37a7SXin LI
73*18fd37a7SXin LI	* lib/inttostr.c (inttostr): Protect i < 0 by compile-time
74*18fd37a7SXin LI	test intended to suppress compiler warnings.
75*18fd37a7SXin LI	* lib/inttostr.h: Include limits.h unilaterally.
76*18fd37a7SXin LI	(CHAR_BIT): Remove.
77*18fd37a7SXin LI	(PARAMS): Remove; all uses changed.
78*18fd37a7SXin LI	* lib/setmode.c (__attribute__): New macro.
79*18fd37a7SXin LI	(set_binary_mode): Define only if HAVE_SETMODE_DOS.
80*18fd37a7SXin LI	Otherwise define a dummy static char, as C89 requires
81*18fd37a7SXin LI	that we define something.
82*18fd37a7SXin LI	* lib/setmode.h (set_binary_mode): Return true, not 1.
83*18fd37a7SXin LI
84*18fd37a7SXin LI	* src/analyze.c, src/context.c, src/diff.c, src/io.c, src/util.c:
85*18fd37a7SXin LI	Do not include regex.h, as diff.h does this now.
86*18fd37a7SXin LI
87*18fd37a7SXin LI	* src/cmp.c: Sort includes.  Include <exit.h>, <unlocked-io.h>.
88*18fd37a7SXin LI	(specify_comparison_type): Don't report an error if the comparison
89*18fd37a7SXin LI	type has already been specified the same way as this one.
90*18fd37a7SXin LI
91*18fd37a7SXin LI	* src/cmp.c (usage): Mention exit status.
92*18fd37a7SXin LI	* src/diff.c (option_help_msgid): Likewise.
93*18fd37a7SXin LI	* src/diff3.c (usage): Likewise.
94*18fd37a7SXin LI	* src/sdiff.c (usage): Likewise.
95*18fd37a7SXin LI
96*18fd37a7SXin LI	* src/cmp.c (main): Adjust to latest gnulib c_stack_action
97*18fd37a7SXin LI	calling conventions.
98*18fd37a7SXin LI	* src/diff.c (main): Likewise.
99*18fd37a7SXin LI	* src/diff3.c (main): Likewise.
100*18fd37a7SXin LI	* src/sdiff.c (main): Likewise.
101*18fd37a7SXin LI
102*18fd37a7SXin LI	* src/cmp.c (main): Adjust to latest version_etc calling conventions.
103*18fd37a7SXin LI	* src/diff.c (main): Likewise.
104*18fd37a7SXin LI	* src/diff3.c (main): Likewise.
105*18fd37a7SXin LI	* src/sdiff.c (main): Likewise.
106*18fd37a7SXin LI
107*18fd37a7SXin LI	* src/diff.c: Include <exit.h>.
108*18fd37a7SXin LI	(binary): Define to true if not declared.
109*18fd37a7SXin LI	(longopts): Set tabsize flag to 1.
110*18fd37a7SXin LI	(main): Don't output nanoseconds if platform lacks them.
111*18fd37a7SXin LI	Don't treat files as binary if !binary.
112*18fd37a7SXin LI	(set_mtime_to_now): Use 0, not NULL.
113*18fd37a7SXin LI	(compare_files): Mark files as nonexistent if it looks like
114*18fd37a7SXin LI	'patch' created inaccessible regular empty files to denote
115*18fd37a7SXin LI	nonexistent backups.  Don't compare such files.
116*18fd37a7SXin LI	Clear st_* members of status of	nonexistent file.
117*18fd37a7SXin LI	Remove now-unnecessary tests.
118*18fd37a7SXin LI
119*18fd37a7SXin LI	* src/diff.h: Include regex.h, unlocked-io.h.
120*18fd37a7SXin LI	(struct file_data.changed): Now char *, not bool *, to save
121*18fd37a7SXin LI	space on hosts where bool takes more space than char.
122*18fd37a7SXin LI	All uses changed.
123*18fd37a7SXin LI
124*18fd37a7SXin LI	* src/diff3.c: Include unlocked-io.h.
125*18fd37a7SXin LI	(strip_trailing_cr): New var.
126*18fd37a7SXin LI	(STRIP_TRAILING_CR_OPTION): New enum.
127*18fd37a7SXin LI	(longopts, main, option_help_msgid, read_diff):
128*18fd37a7SXin LI	Add --strip-trailing-cr support.
129*18fd37a7SXin LI	(read_diff): Exit with status 126 (not 127) if errno != ENOENT
130*18fd37a7SXin LI	after failed execvp in child.  Report this in parent.
131*18fd37a7SXin LI
132*18fd37a7SXin LI	* src/dir.c: Include <strcase.h>.
133*18fd37a7SXin LI	(failed_locale_specific_sorting): Renamed from failed_strcoll.
134*18fd37a7SXin LI	All uses changed.
135*18fd37a7SXin LI	(compare_names): Don't invoke strcasecmp first thing when
136*18fd37a7SXin LI	ignore_file_name_case; if locale_specific_sorting, we should
137*18fd37a7SXin LI	just use that.
138*18fd37a7SXin LI
139*18fd37a7SXin LI	* src/ifdef.c (next_line): Remove; replace with...
140*18fd37a7SXin LI	(next_line0, next_line1): New vars.
141*18fd37a7SXin LI	(print_ifdef_script, print_ifdef_hunk):
142*18fd37a7SXin LI	Use them to fix line-number computation bug.
143*18fd37a7SXin LI
144*18fd37a7SXin LI	* src/io.c (find_and_hash_each_line): Don't convert char *
145*18fd37a7SXin LI	to unsigned char *; just leave pointers as char *.  This
146*18fd37a7SXin LI	lessens the number of potentially-dangerous casts.
147*18fd37a7SXin LI	* src/util.c (lines_differ): Likewise.
148*18fd37a7SXin LI
149*18fd37a7SXin LI	* src/sdiff.c: Include <unlocked-io.h>, <exit.h>.
150*18fd37a7SXin LI	(check_child_status): Renamed from ck_editor_status, and
151*18fd37a7SXin LI	accept a new arg MAX_OK_STATUS.  All callers changed.
152*18fd37a7SXin LI	Handle status 126/127 as per POSIX.
153*18fd37a7SXin LI	(edit): Likewise.
154*18fd37a7SXin LI	(main): Likewise.  Fix getopt typo: -E wasn't supported.
155*18fd37a7SXin LI
156*18fd37a7SXin LI	* src/system.h (S_IRWXU, S_IRWXG, S_IRWXO): Define if not defined.
157*18fd37a7SXin LI	(S_IXUSR, S_IXGRP, S_IXOTH): Remove.
158*18fd37a7SXin LI	Include <time.h> unconditionally, since we can assume C89 now.
159*18fd37a7SXin LI	Likewise for <stdlib.h>, <string.h>.
160*18fd37a7SXin LI	(getenv, EXIT_SUCCESS, EXIT_FAILURE, SSIZE_MAX, strchr, strrchr,
161*18fd37a7SXin LI	memcmp, memcpy): Remove decl; no longer needed.
162*18fd37a7SXin LI	(strcasecoll, strcasecmp): Define if not built in.
163*18fd37a7SXin LI	(CTYPE_DOMAIN, ISPRINT, ISSPACE, TOLOWER, _tolower, errno): Remove;
164*18fd37a7SXin LI	we now assume C89 or better.  All uses changed.
165*18fd37a7SXin LI	Include <stdbool.h> unconditionally now, since gnulib supports it
166*18fd37a7SXin LI	if the C compiler doesn't.  All boolean uses of 0 and 1 now
167*18fd37a7SXin LI	changed to false and true.
168*18fd37a7SXin LI	(lin_is_printable_as_long_int): Renamed from lin_is_printable_as_long.
169*18fd37a7SXin LI
170*18fd37a7SXin LI	* src/util.c (begin_output): Fix bug: 0 wasn't cast to char * arg,
171*18fd37a7SXin LI	which led to undefined behavior on 64-bit hosts.
172*18fd37a7SXin LI	Use more-standard test for exit status 126 versus 127.
173*18fd37a7SXin LI	(finish_output): Likewise.
174*18fd37a7SXin LI	(analyze_hunk): Do not cast bool to int.
175*18fd37a7SXin LI
176*18fd37a7SXin LI2004-03-15  Paul Eggert  <eggert@twinsun.com>
177*18fd37a7SXin LI
178*18fd37a7SXin LI	* src/cmp.c (main): Don't consider two files with the same name to
179*18fd37a7SXin LI	be the same, if their initial skip values differ.  This fixes a
180*18fd37a7SXin LI	bug reported by Hideki Iwamoto in
181*18fd37a7SXin LI	<http://mail.gnu.org/archive/html/bug-gnu-utils/2004-03/msg00024.html>.
182*18fd37a7SXin LI
183*18fd37a7SXin LI2004-03-11  Paul Eggert  <eggert@twinsun.com>
184*18fd37a7SXin LI
185*18fd37a7SXin LI	* src/analyze.c (diag): Return void, not lin, since the return
186*18fd37a7SXin LI	value wasn't needed.  All callers changed.
187*18fd37a7SXin LI	(diag, diff_2_files):
188*18fd37a7SXin LI	Use 'true' and 'false' instead of '1' and '0', when appropriate.
189*18fd37a7SXin LI	(compareseq): Use lin const * local variables instead of lin *.
190*18fd37a7SXin LI	Don't bother checking diag's return value.
191*18fd37a7SXin LI	(shift_boundaries, build_reverse_script, build_script, diff_2_files):
192*18fd37a7SXin LI	Use char arrays, not bool arrays, since
193*18fd37a7SXin LI	sizeof (bool) might be greater than 1.
194*18fd37a7SXin LI
195*18fd37a7SXin LI2004-02-09  Paul Eggert  <eggert@twinsun.com>
196*18fd37a7SXin LI
197*18fd37a7SXin LI	* m4/setmode.m4 (AC_FUNC_SETMODE_DOS): AC_LIBOBJ(setmode) if
198*18fd37a7SXin LI	we would return true.
199*18fd37a7SXin LI
200*18fd37a7SXin LI2002-10-14  Paul Eggert  <eggert@twinsun.com>
201*18fd37a7SXin LI
202*18fd37a7SXin LI	* src/Makefile.am (diff3.$(OBJEXT), diff.$(OBJEXT),
203*18fd37a7SXin LI	sdiff.$(OBJEXT)): Rename from (misspelled) diff3.$(OBJECT),
204*18fd37a7SXin LI	diff.$(OBJECT), sdiff.$(OBJECT).  Patch by Paul D. Smith in
205*18fd37a7SXin LI	<http://mail.gnu.org/pipermail/bug-gnu-utils/2002-October/003251.html>.
206*18fd37a7SXin LI	Bug reported by Chris Bainbridge.
207*18fd37a7SXin LI
208*18fd37a7SXin LI2002-10-13  Paul Eggert  <eggert@twinsun.com>
209*18fd37a7SXin LI
210*18fd37a7SXin LI	* src/Makefile.am (MOSTLYCLEANFILES): Add paths.ht.
211*18fd37a7SXin LI	(paths.h): Send output to paths.ht first, and then rename to
212*18fd37a7SXin LI	paths.h at the end.  This avoids problems if the disk is full.
213*18fd37a7SXin LI	It also works around what appears to be a bug with GNU make -j
214*18fd37a7SXin LI	(3.79.1); see <http://bugs.gentoo.org/show_bug.cgi?id=8934>.
215*18fd37a7SXin LI
216*18fd37a7SXin LI2002-06-27  Paul Eggert  <eggert@twinsun.com>
217*18fd37a7SXin LI
218*18fd37a7SXin LI	* NEWS, configure.ac (AC_INIT): Version 2.8.4.
219*18fd37a7SXin LI
220*18fd37a7SXin LI	* config/config.sub: Sync with latest version maintained in other
221*18fd37a7SXin LI	packages.
222*18fd37a7SXin LI
223*18fd37a7SXin LI	* lib/file-type.h: Protect against double inclusion.  Detect
224*18fd37a7SXin LI	whether <sys/stat.h> has been included.  Fix from Jim Meyering.
225*18fd37a7SXin LI
226*18fd37a7SXin LI	* src/analyze.c (briefly_report): Don't say "Binary files differ",
227*18fd37a7SXin LI	since one of the files may not be a binary file.
228*18fd37a7SXin LI	Bug reported by Dan Jacobson.
229*18fd37a7SXin LI
230*18fd37a7SXin LI2002-06-22  Paul Eggert  <eggert@twinsun.com>
231*18fd37a7SXin LI
232*18fd37a7SXin LI	* lib/c-stack.c (segv_handler, c_stack_action) [! defined
233*18fd37a7SXin LI	SA_SIGINFO]: Do not assume SA_SIGINFO behavior.
234*18fd37a7SXin LI	Bug reported by Jim Meyering on NetBSD 1.5.2.
235*18fd37a7SXin LI
236*18fd37a7SXin LI2002-06-16  Paul Eggert  <eggert@twinsun.com>
237*18fd37a7SXin LI
238*18fd37a7SXin LI	* NEWS, configure.ac (AC_INIT): Version 2.8.3.
239*18fd37a7SXin LI
240*18fd37a7SXin LI	* config/depcomp, config/missing, README: Update to automake 1.6.2.
241*18fd37a7SXin LI
242*18fd37a7SXin LI	* po/LINGUAS: Add en_US.
243*18fd37a7SXin LI	* po/en_US.po: New file.
244*18fd37a7SXin LI	* po/POTFILES.in: Remove lib/freesoft.c.
245*18fd37a7SXin LI	Add lib/file-type.c, lib/version-etc.c, lib/xmalloc.c.
246*18fd37a7SXin LI
247*18fd37a7SXin LI2002-06-15  Paul Eggert  <eggert@twinsun.com>
248*18fd37a7SXin LI
249*18fd37a7SXin LI	* doc/diff.texi (Special Files): Document behavior of symlink
250*18fd37a7SXin LI	loops.
251*18fd37a7SXin LI
252*18fd37a7SXin LI	* lib/Makefile.am (noinst_HEADERS): Remove freesoft.h.
253*18fd37a7SXin LI	Add version-etc.h.
254*18fd37a7SXin LI	(libdiffutils_a_SOURCES): Remove freesoft.c.  Add version-etc.c.
255*18fd37a7SXin LI	* lib/freesoft.c, lib/freesoft.h: Remove.
256*18fd37a7SXin LI	* lib/version-etc.h (PARAMS): Remove; we now assume C89 at least.
257*18fd37a7SXin LI
258*18fd37a7SXin LI	* lib/version-etc.h (version_etc): Remove package and version args.
259*18fd37a7SXin LI	(version_etc_copyright): Remove.
260*18fd37a7SXin LI	* lib/version-etc.c: Likewise.
261*18fd37a7SXin LI	Do not include unlocked-io.h; no longer needed.
262*18fd37a7SXin LI	Include gettext.h rather than libinto.h.
263*18fd37a7SXin LI	(_): Define unconditionally.
264*18fd37a7SXin LI	(version_etc): Adjust wording to match current GNU coding standards.
265*18fd37a7SXin LI	Translate "(C)" if possible.
266*18fd37a7SXin LI
267*18fd37a7SXin LI	* lib/version-etc.c, lib/version-etc.h: New files, taken from
268*18fd37a7SXin LI	fileutils.
269*18fd37a7SXin LI
270*18fd37a7SXin LI	* src/Makefile.am (cmp_SOURCES, diff3_SOURCES, sdiff_SOURCES,
271*18fd37a7SXin LI	diff_SOURCES): Remove version.c.
272*18fd37a7SXin LI	(MAINTAINERCLEANFILES, $(srcdir)/version.c): Remove.
273*18fd37a7SXin LI
274*18fd37a7SXin LI	* src/cmp.c: Include version-etc.h, not freesoft.h.
275*18fd37a7SXin LI	(copyright_notice): Remove.
276*18fd37a7SXin LI	(main): Use version_etc to print version.
277*18fd37a7SXin LI	* src/diff.c, src/diff3.c, src/sdiff.c: Likewise.
278*18fd37a7SXin LI
279*18fd37a7SXin LI	* src/cmp.c (version_string): Remove decl.
280*18fd37a7SXin LI	* src/diff.h, src/diff3.c, src/sdiff.c: Likewise.
281*18fd37a7SXin LI
282*18fd37a7SXin LI2002-06-11  Paul Eggert  <eggert@twinsun.com>
283*18fd37a7SXin LI
284*18fd37a7SXin LI	* lib/fnmatch.c, lib/fnmatch_loop.c (WIDE_CHAR_SUPPORT):
285*18fd37a7SXin LI	New macro.  Use it uniformly instead of
286*18fd37a7SXin LI	(defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H).
287*18fd37a7SXin LI	It also uses HAVE_BTOWC, to fix a porting bug on Solaris 2.5.1
288*18fd37a7SXin LI	reported by Vin Shelton.
289*18fd37a7SXin LI	* m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for btowc.
290*18fd37a7SXin LI
291*18fd37a7SXin LI	* NEWS, configure.ac (AC_INIT): Version 2.8.2.
292*18fd37a7SXin LI
293*18fd37a7SXin LI	* ABOUT-NLS, config/config.guess, config/config.sub,
294*18fd37a7SXin LI	config/depcomp, config/texinfo.tex, lib/posix/regex.h,
295*18fd37a7SXin LI	m4/c-bs-a.m4, m4/gettext.m4, m4/gnu-source.m4, m4/lib-link.m4,
296*18fd37a7SXin LI	m4/malloc.m4:
297*18fd37a7SXin LI	Update to recent version (maintained in other packages).
298*18fd37a7SXin LI	* m4/prereq.m4 (jm_PREREQ_EXCLUSIVE): AC_FUNC_FNMATCH_GNU
299*18fd37a7SXin LI	no longer takes a lib.
300*18fd37a7SXin LI
301*18fd37a7SXin LI	* README: Incorporate contents from INSTALLME.
302*18fd37a7SXin LI	* INSTALLME: Remove.
303*18fd37a7SXin LI	* Makefile.am (EXTRA_DIST): Remove INSTALLME.
304*18fd37a7SXin LI
305*18fd37a7SXin LI	* configure.ac (AC_GNU_SOURCE): Move up, so that it affects
306*18fd37a7SXin LI	later compilations properly.
307*18fd37a7SXin LI	(DEFAULT_DIFF_PROGRAM, AC_TYPE_SIGNAL): Remove.
308*18fd37a7SXin LI	(jm_AC_TYPE_INTMAX_T): Add.
309*18fd37a7SXin LI	(AC_FUNC_FNMATCH_GNU): Use this, instead of AC_FUNC_FNMATCH.
310*18fd37a7SXin LI	(AC_CONFIG_LINKS): regex.hin renamed from regex_.h.
311*18fd37a7SXin LI
312*18fd37a7SXin LI	* doc/diff.texi: Reword "@option{-f} and @option{--foo}" to
313*18fd37a7SXin LI	"@option{-f} or @option{--foo}".
314*18fd37a7SXin LI	Use @acronym instead of @sc where appropriate.
315*18fd37a7SXin LI	(Specified Lines): Renamed from Specified Folding.
316*18fd37a7SXin LI	(Comparison, Blank Lines):
317*18fd37a7SXin LI	Clarify wordings for Blank Lines and Specified Lines nodes.
318*18fd37a7SXin LI	(Binary): Mention --verbose and --print-bytes.
319*18fd37a7SXin LI	(Tabs, sdiff Option Summary, diff Options):
320*18fd37a7SXin LI	New option --tabsize=COLUMNS.
321*18fd37a7SXin LI
322*18fd37a7SXin LI	* lib/Makefile.am (EXTRA_DIST): Add fnmatch_loop.c.
323*18fd37a7SXin LI	(noinst_HEADERS): fnmatch_.h renamed from fnmatch.hin.
324*18fd37a7SXin LI	regex_.h renamed from regex.hin.
325*18fd37a7SXin LI	Add file-type.h.
326*18fd37a7SXin LI	(libdiffutils_a_SOURCES): Add file-type.c.
327*18fd37a7SXin LI	(DISTCLEANFILES): Remove fnmatch.hno, regex.hno.
328*18fd37a7SXin LI
329*18fd37a7SXin LI	* lib/c-stack.c (__attribute__): New macro.
330*18fd37a7SXin LI	(EOVERFLOW): Define if not defined.
331*18fd37a7SXin LI	(stack_t): Define to struct sigaltstack if not defined or declared.
332*18fd37a7SXin LI	Include <sys/resource.h>, <ucontext.h> if available.
333*18fd37a7SXin LI	Include <stdio.h> if DEBUG.
334*18fd37a7SXin LI	Do not include <inttypes.h> or <stdint.h>.
335*18fd37a7SXin LI	(c_stack_die): Remove info and context args.  All uses changed.
336*18fd37a7SXin LI	(segv_action): Likewise.
337*18fd37a7SXin LI	(alternate_signal_stack): Change uintmax_t to long, to ease porting.
338*18fd37a7SXin LI	(get_stack_location, min_address_from_argv, max_address_from_argv,
339*18fd37a7SXin LI	null_action): New functions.
340*18fd37a7SXin LI	(stack_base, stack_size): New vars.
341*18fd37a7SXin LI	(segv_handler): context arg may not be used.
342*18fd37a7SXin LI	Use global stack_base, stack_size if
343*18fd37a7SXin LI	! HAVE_XSI_STACK_OVERFLOW_HEURISTIC.
344*18fd37a7SXin LI	Add debug code.
345*18fd37a7SXin LI	Invoke die (rather than segv_action) to exit.
346*18fd37a7SXin LI	(c_stack_action): Accept new argv arg, and simpler handler arg.
347*18fd37a7SXin LI	All uses changed.  Move code into new functions above.
348*18fd37a7SXin LI	Allow null action.
349*18fd37a7SXin LI	[! (defined SA_ONSTACK && defined _SC_PAGESIZE)]: Assume all segvs
350*18fd37a7SXin LI	are stack overflows.
351*18fd37a7SXin LI	(main) [DEBUG]: Describe what output should be like.
352*18fd37a7SXin LI
353*18fd37a7SXin LI	* lib/c-stack.h (siginfo_t, c_stack_die): Remove decl.
354*18fd37a7SXin LI
355*18fd37a7SXin LI	* lib/file-type.c, lib/file-type.h: New files.  These contain code
356*18fd37a7SXin LI	that was in src/diff.c, but is now librarified and spiffed up a
357*18fd37a7SXin LI	bit.  Jim Meyering suggested this.
358*18fd37a7SXin LI
359*18fd37a7SXin LI	* lib/fnmatch.c (alloca, __builtin_expect): Define for non-GCC hosts.
360*18fd37a7SXin LI	<strings.h>: Include only if HAVE_STRINGS_H.
361*18fd37a7SXin LI	<stddef.h>: Include if we include stdlib.h.
362*18fd37a7SXin LI	Do not comment out all code if ! HAVE_FNMATCH_GNU.
363*18fd37a7SXin LI	(getenv): Do not declare if HAVE_DECL_GETENV.
364*18fd37a7SXin LI	(__strchrnul, __wcschrnul): Remove; not used.
365*18fd37a7SXin LI	(MEMPCPY): Use mempcpy if not _LIBC; use memcpy if neither _LIBC
366*18fd37a7SXin LI	nor HAVE_MEMPCPY.
367*18fd37a7SXin LI	(FOLD) [HANDLE_MULTIBYTE]: Do not pass wide char to ISUPPER.
368*18fd37a7SXin LI	(STRLEN, STRCAT, MEMPCPY) [HANDLE_MULTIBYTE && !defined _LIBC]:
369*18fd37a7SXin LI	Use wcslen rather than __wcslen, and likewise for wcscat, wmempcpy.
370*18fd37a7SXin LI	(MEMPCPY) [HANDLE_MULTIBYTE]: Use wmempcpy if not _LIBC; use wmemcpy
371*18fd37a7SXin LI	if neither _LIBC nor HAVE_WMEMPCPY.
372*18fd37a7SXin LI	* lib/fnmatch_.h (__const): Do not define to empty, as this breaks
373*18fd37a7SXin LI	Sun cc.  The code doesn't work with K&R anyway.
374*18fd37a7SXin LI	* lib/fnmatch_loop.c (struct patternlist.str): Size 1, not 0,
375*18fd37a7SXin LI	as C89 requires this.
376*18fd37a7SXin LI	(NEW_PATTERN): Use offsetof, not sizeof, since str now has size 1.
377*18fd37a7SXin LI	* lib/fnmatch_.h: Import from glibc fnmatch.h.
378*18fd37a7SXin LI	* lib/fnmatch.c, lib/fnmatch_loop.c: Import from glibc.
379*18fd37a7SXin LI
380*18fd37a7SXin LI	* lib/posixver.c: Include posixver.h.
381*18fd37a7SXin LI
382*18fd37a7SXin LI	* lib/regex_.h: Renamed from lib/regex.hin.
383*18fd37a7SXin LI
384*18fd37a7SXin LI	* m4/c-stack.m4 (jm_PREREQ_C_STACK): Do not AC_REQUIRE
385*18fd37a7SXin LI	jm_AC_TYPE_UINTMAX_T and do not use uintmax_t.
386*18fd37a7SXin LI	Check for sys/resource.h, uccontext.h.
387*18fd37a7SXin LI	Check for decls and existence of getcontext, sigaltstack.
388*18fd37a7SXin LI	Check for stack_t.
389*18fd37a7SXin LI
390*18fd37a7SXin LI	* m4/codeset.m4, m4/glibc21.m4, m4/lcmessage.m4: Remove.
391*18fd37a7SXin LI
392*18fd37a7SXin LI	* m4/fnmatch.m4: Update to latest Autoconf CVS for AC_FUNC_FNMATCH_GNU.
393*18fd37a7SXin LI	* m4/gnu-source.m4: Likewise, for AC_GNU_SOURCE (renamed from
394*18fd37a7SXin LI	AC__GNU_SOURCE).
395*18fd37a7SXin LI
396*18fd37a7SXin LI	* m4/mbstate_t.m4 (AC_TYPE_MBSTATE_T): Renamed from AC_MBSTATE_T.
397*18fd37a7SXin LI	All uses changed.  Upgrade to recent Autoconf CVS.
398*18fd37a7SXin LI
399*18fd37a7SXin LI	* m4/stdbool.m4 (AC_HEADER_STDBOOL): Do not cast pointer to
400*18fd37a7SXin LI	bool in integer constant expression; C99 does not allow it.
401*18fd37a7SXin LI	Reported by Bruno Haible.
402*18fd37a7SXin LI
403*18fd37a7SXin LI	* po/LINGUAS: Add hu, pt_BR.
404*18fd37a7SXin LI	* po/hu.po, po/pt_BR.po: New files.
405*18fd37a7SXin LI
406*18fd37a7SXin LI	* src/Makefile.am (noinst_HEADERS): Remove diff.h.
407*18fd37a7SXin LI	(DEFS): Remove.
408*18fd37a7SXin LI	(diff_sources): Add diff.h.
409*18fd37a7SXin LI	(MOSTLYCLEANFILES): New macro.
410*18fd37a7SXin LI	(cmp.$(OBJEXT) diff3.$(OBJECT) diff.$(OBJECT) sdiff.$(OBJECT)): Depend
411*18fd37a7SXin LI	on paths.h.
412*18fd37a7SXin LI	(paths.h): New rule.
413*18fd37a7SXin LI
414*18fd37a7SXin LI	* src/analyze.c, src/cmp.c, src/diff.c, src/diff3.c, src/io.c,
415*18fd37a7SXin LI	src/sdiff.c: Include <file-type.h>.
416*18fd37a7SXin LI
417*18fd37a7SXin LI	* src/cmp.c: Include paths.h.
418*18fd37a7SXin LI	(copyright_notice): Renamed from copyright_string.
419*18fd37a7SXin LI	Now a msgid, so that copyright symbol can be translated.
420*18fd37a7SXin LI	All uses changed.
421*18fd37a7SXin LI	* src/diff.c, src/diff3.c, src/sdiff.c: Likewise.
422*18fd37a7SXin LI
423*18fd37a7SXin LI	* src/diff.c: Include posixver.h.
424*18fd37a7SXin LI	(TABSIZE_OPTION): New constant.
425*18fd37a7SXin LI	(main): Allow widths up to SIZE_MAX.
426*18fd37a7SXin LI	(filetype): Move to lib/file-type.c and rename to file_type.
427*18fd37a7SXin LI	All uses changed.
428*18fd37a7SXin LI
429*18fd37a7SXin LI	* src/diff.c (longopts, main, usage): New option --tabsize=COLUMNS.
430*18fd37a7SXin LI	* src/io.c (find_and_hash_each_line): Likewise.
431*18fd37a7SXin LI
432*18fd37a7SXin LI	* src/diff.h (TAB_WIDTH): Remove.
433*18fd37a7SXin LI	(tabsize): New decl.
434*18fd37a7SXin LI	(sdiff_half_width, sdiff_column2_offset): Now size_t rather than
435*18fd37a7SXin LI	unsigned int.
436*18fd37a7SXin LI
437*18fd37a7SXin LI	* src/diff3.c (skipwhite, readnum): New functions.
438*18fd37a7SXin LI	(process_diff_control): Use them.
439*18fd37a7SXin LI	(SKIPWHITE, READNUM): Remove.
440*18fd37a7SXin LI	(read_diff): Don't worry about errno == ENOEXEC.
441*18fd37a7SXin LI
442*18fd37a7SXin LI	* src/sdiff.c (catchsig, signal_handler, initial_action): Signal
443*18fd37a7SXin LI	handlers return void, not RETSIGTYPE, since we no longer support
444*18fd37a7SXin LI	K&R.
445*18fd37a7SXin LI	(TABSIZE_OPTION): New constant.
446*18fd37a7SXin LI	(longopts, usage, main): New option --tabsize=COLUMNS.
447*18fd37a7SXin LI	(cleanup): New arg signo.  All uses changed.
448*18fd37a7SXin LI	(ck_editor_status, main, edit): Don't worry about ENOEXEC.
449*18fd37a7SXin LI
450*18fd37a7SXin LI	* src/side.c (tab_from_to, print_half_line, print_1sdiff_line):
451*18fd37a7SXin LI	New option --tabsize=COLUMNS.
452*18fd37a7SXin LI
453*18fd37a7SXin LI	* src/system.h (S_ISBLK, S_ISCHR, S_ISDIR, S_ISFIFO, S_ISREG,
454*18fd37a7SXin LI	S_ISSOCK): Remove; now in lib/file-type.h.
455*18fd37a7SXin LI
456*18fd37a7SXin LI	* src/util.c (finish_output): Check for ENOEXEC.
457*18fd37a7SXin LI	(lines_differ, output_1_line): New option --tabsize=COLUMNS.
458*18fd37a7SXin LI	(analyze_hunk): If -b or -w is also specified, -B now considers
459*18fd37a7SXin LI	lines to be empty if they contain only white space.
460*18fd37a7SXin LI
461*18fd37a7SXin LI2002-04-05  Paul Eggert  <eggert@sic.twinsun.com>
462*18fd37a7SXin LI
463*18fd37a7SXin LI	* NEWS, configure.ac (AC_INIT): Version 2.8.1.
464*18fd37a7SXin LI
465*18fd37a7SXin LI	* configure.ac (AC_HEADER_STDBOOL): Add.
466*18fd37a7SXin LI	(AC_CHECK_HEADERS): Remove stdbool.h.
467*18fd37a7SXin LI	* m4/stdbool.m4: New file.
468*18fd37a7SXin LI	* m4/prereq.m4 (jm_PREREQ_EXCLUDE):
469*18fd37a7SXin LI	Use AC_HEADER_STDBOOL rather than AC_CHECK_HEADERS(stdbool.h).
470*18fd37a7SXin LI	(jm_PREREQ_HASH): Likewise.
471*18fd37a7SXin LI
472*18fd37a7SXin LI	* src/system.h (SSIZE_MAX): Define if limits.h doesn't.
473*18fd37a7SXin LI
474*18fd37a7SXin LI	* src/analyze.c (diff_2_files): Assign PTRDIFF_MAX - 1 to a
475*18fd37a7SXin LI	size_t variable, just in case there's a problem with ptrdiff_t
476*18fd37a7SXin LI	versus size_t.
477*18fd37a7SXin LI
478*18fd37a7SXin LI	* lib/cmpbuf.c (errno): Remove decl; K&R C is no longer supported.
479*18fd37a7SXin LI	Include limits.h.
480*18fd37a7SXin LI	(SIZE_MAX, SSIZE_MAX): Define if standard headers don't.
481*18fd37a7SXin LI	(MIN): New macro.
482*18fd37a7SXin LI	(block_read): Do not attempt to read more than SSIZE_MAX bytes, as the
483*18fd37a7SXin LI	resulting behavior is implementation-defined.  Work around bug in
484*18fd37a7SXin LI	Tru64 5.1, which can't read more than INT_MAX bytes at a time.
485*18fd37a7SXin LI	* src/cmp.c (cmp): Use block_read instead of read, to work
486*18fd37a7SXin LI	around Tru64 5.1 bug.
487*18fd37a7SXin LI	* src/diff3.c (read_diff): Likewise.
488*18fd37a7SXin LI	* src/diff3.c: Include cmpbuf.h.
489*18fd37a7SXin LI
490*18fd37a7SXin LI	* THANKS: Add Ulrich Drepper.
491*18fd37a7SXin LI
492*18fd37a7SXin LI	* INSTALLME: Mention GNU texinfo.
493*18fd37a7SXin LI
494*18fd37a7SXin LI	* doc/diff.texi:
495*18fd37a7SXin LI	Use new @copying directive.
496*18fd37a7SXin LI	Put @contents first, not last, since Texinfo now suggests this.
497*18fd37a7SXin LI	Fix bug in -w documentation noted by Karl Berry.
498*18fd37a7SXin LI	Mention links for speedup.
499*18fd37a7SXin LI	New node "Speedups" for future speedups.
500*18fd37a7SXin LI	Just say "Index", not "Concept Index".
501*18fd37a7SXin LI
502*18fd37a7SXin LI2002-03-26  Paul Eggert  <eggert@twinsun.com>
503*18fd37a7SXin LI
504*18fd37a7SXin LI	* src/Makefile.am:
505*18fd37a7SXin LI	(INCLUDES): Remove this obsolete macro,	replacing it with:
506*18fd37a7SXin LI	(AM_CPPFLAGS): New macro.
507*18fd37a7SXin LI
508*18fd37a7SXin LI2002-03-26  Albert Chin-A-Young  <china@thewrittenword.com>
509*18fd37a7SXin LI
510*18fd37a7SXin LI	* src/Makefile.am (datadir): Remove, as it conflicts with --datadir.
511*18fd37a7SXin LI
512*18fd37a7SXin LI2002-03-26  Paul Eggert  <eggert@twinsun.com>
513*18fd37a7SXin LI
514*18fd37a7SXin LI	* doc/diff.texi (dircategory GNU packages): Fix typo: a "* " was
515*18fd37a7SXin LI	missing before the menu entry.  Bug diagnosed by Adam Heath.
516*18fd37a7SXin LI	Also, put this dircategory after the Individual utilities dircategory,
517*18fd37a7SXin LI	to work around a compatibility problem with Debian install-info.
518*18fd37a7SXin LI
519*18fd37a7SXin LI2002-03-24  Eli Zaretskii  <eliz@is.elta.co.il>
520*18fd37a7SXin LI
521*18fd37a7SXin LI	* src/io.c (sip): Do not mishandle buffered count when reverting
522*18fd37a7SXin LI	to text mode.
523*18fd37a7SXin LI
524*18fd37a7SXin LI2002-03-23  Paul Eggert  <eggert@twinsun.com>
525*18fd37a7SXin LI
526*18fd37a7SXin LI	* NEWS, configure.ac (AC_INIT): Version 2.8.
527*18fd37a7SXin LI	* configure.ac (AC_PREREQ): 2.53.
528*18fd37a7SXin LI	* INSTALLME: Upgrade to gettext 0.11.1 and help2man 1.27.
529*18fd37a7SXin LI
530*18fd37a7SXin LI	* doc/diff.texi: Upgrade the description of `patch' to GNU patch
531*18fd37a7SXin LI	2.5.4, and revamp the documentation accordingly.
532*18fd37a7SXin LI
533*18fd37a7SXin LI	* src/diff.c (main): Fix typo that prevented diff -y from working.
534*18fd37a7SXin LI	Bug reported by Mitsuru Chinen.
535*18fd37a7SXin LI
536*18fd37a7SXin LI2002-03-15  Paul Eggert  <eggert@twinsun.com>
537*18fd37a7SXin LI
538*18fd37a7SXin LI	* lib/c-stack.c (c_stack_die) [!HAVE_SIGINFO_T]: Don't use info.
539*18fd37a7SXin LI	Bug reported by Eli Zaretskii.
540*18fd37a7SXin LI
541*18fd37a7SXin LI2002-03-15  Eli Zaretskii  <eliz@is.elta.co.il>
542*18fd37a7SXin LI
543*18fd37a7SXin LI	* ms/config.sed: Tweak editing of install-info-am target.
544*18fd37a7SXin LI
545*18fd37a7SXin LI2002-03-12  Paul Eggert  <eggert@twinsun.com>
546*18fd37a7SXin LI
547*18fd37a7SXin LI	* NEWS, configure.ac (AC_INIT): Version 2.7.10.
548*18fd37a7SXin LI
549*18fd37a7SXin LI	* NEWS: cmp -l -s and cmp -s -l are not allowed.
550*18fd37a7SXin LI	Deprecate diff -h, -H, -L, -P, --inhibit-hunk-merge.
551*18fd37a7SXin LI
552*18fd37a7SXin LI	* configure.ac (jm_PREREQ_HARD_LOCALE): Add.
553*18fd37a7SXin LI	(AM_INIT_AUTOMAKE): Do not distribute shar file.
554*18fd37a7SXin LI
555*18fd37a7SXin LI	* doc/diff.texi (Overview): byte != character.
556*18fd37a7SXin LI	(Detailed Context, Detailed Unified, Alternate Names, diff Options):
557*18fd37a7SXin LI	Do not document diff -L.
558*18fd37a7SXin LI	(Comparing Directories, Making Patches, diff Options):
559*18fd37a7SXin LI	Do not document diff -P.
560*18fd37a7SXin LI	(diff Performance, sdiff Option Summary, diff Options, sdiff Options):
561*18fd37a7SXin LI	Do not document diff -H.
562*18fd37a7SXin LI	(diff Performance, diff Options): Do not document --horizon-lines.
563*18fd37a7SXin LI	(cmp Options): Prefer -b to -c.
564*18fd37a7SXin LI	(cmp Options, diff Options, diff3 Options, patch Options,
565*18fd37a7SXin LI	sdiff Options): Put short options next to the similar long options.
566*18fd37a7SXin LI	Document --help, and use the same wording for --verbose.
567*18fd37a7SXin LI	(diff3 Options): Fix typo in description of -E, which used wrongly used
568*18fd37a7SXin LI	"-e" instead of "-E".
569*18fd37a7SXin LI
570*18fd37a7SXin LI	* lib/hard-locale.c (alloca): Remove.
571*18fd37a7SXin LI	Include stdlib.h if available, for malloc.
572*18fd37a7SXin LI	(hard_locale): Use malloc, not alloca, so that we need not worry about
573*18fd37a7SXin LI	alloca issues.  Test for storage allocation failure.
574*18fd37a7SXin LI
575*18fd37a7SXin LI	* m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_HARD_LOCALE.
576*18fd37a7SXin LI	(jm_PREREQ_HARD_LOCALE): New macro.
577*18fd37a7SXin LI
578*18fd37a7SXin LI	* src/cmp.c (specify_comparison_type): New function.
579*18fd37a7SXin LI	(check_stdout): "indices and codes" -> "byte numbers and values"
580*18fd37a7SXin LI	(main): Detect clashing options.
581*18fd37a7SXin LI	(cmp): Use "byte" rather than "char" if a translation for "byte"
582*18fd37a7SXin LI	is available, even when in the POSIX locale.
583*18fd37a7SXin LI
584*18fd37a7SXin LI	* src/diff.c (option_help_msgid): Do not document -L, -P,
585*18fd37a7SXin LI	--horizon-lines, --inhibit-hunk-merge, -H.
586*18fd37a7SXin LI	* src/diff.h: -L -> --label
587*18fd37a7SXin LI
588*18fd37a7SXin LI2002-03-11  Paul Eggert  <eggert@twinsun.com>
589*18fd37a7SXin LI
590*18fd37a7SXin LI	* NEWS, configure.ac (AC_INIT): Version 2.7.9.
591*18fd37a7SXin LI
592*18fd37a7SXin LI	* INSTALLME: Update to autoconf 2.53, automake 1.6, help2man
593*18fd37a7SXin LI	1.25 with patch.
594*18fd37a7SXin LI
595*18fd37a7SXin LI	* configure.ac (AC_INIT):
596*18fd37a7SXin LI	Change package name from diff to diffutils.
597*18fd37a7SXin LI	(AM_INIT_AUTOMAKE): Use new form, with option gnits,
598*18fd37a7SXin LI	rather than old from that duplicated AC_INIT.
599*18fd37a7SXin LI	(AM_MISSING_PROG): Add help2man.
600*18fd37a7SXin LI	(REGEX_MALLOC): Define.
601*18fd37a7SXin LI	(AC_CONFIG_FILES): Add man/Makefile.
602*18fd37a7SXin LI
603*18fd37a7SXin LI	* Makefile.am (AUTOMAKE_OPTIONS): Remove.
604*18fd37a7SXin LI	* doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
605*18fd37a7SXin LI	* lib/Makefile.am (AUTOMAKE_OPTIONS): Likewise.
606*18fd37a7SXin LI	* ms/Makefile.am (AUTOMAKE_OPTIONS): Likewise.
607*18fd37a7SXin LI	* src/Makefile.am (AUTOMAKE_OPTIONS): Likewise.
608*18fd37a7SXin LI
609*18fd37a7SXin LI	* lib/c-stack.c: Include <errno.h>
610*18fd37a7SXin LI	(ENOTSUP): Define if errno.h doesn't.
611*18fd37a7SXin LI	(SA_NODEFER, SA_ONSTACK, SA_RESETHAND, SA_SIGINFO, SIGSTKSZ,
612*18fd37a7SXin LI	_SC_PAGESIZE, ALTERNATE_STACK_SIZE, stack_t, sigaltstack):
613*18fd37a7SXin LI	Remove; we now assume them all when
614*18fd37a7SXin LI	HAVE_XSI_STACK_OVERFLOW_HEURISTIC, so we don't need
615*18fd37a7SXin LI	substitutes.
616*18fd37a7SXin LI	(<ucontext.h>): Include only if HAVE_XSI_STACK_OVERFLOW_HEURISTIC.
617*18fd37a7SXin LI	(alternate_signal_stack): Now of size SIGSTKSZ.
618*18fd37a7SXin LI	(segv_handler): Simplify, under the assumption that
619*18fd37a7SXin LI	HAVE_XSI_STACK_OVERFLOW_HEURISTIC is nonzero.
620*18fd37a7SXin LI	(c_stack_action): Likewise.
621*18fd37a7SXin LI	(exit_failure) [DEBUG]: Initialize to 0, not 1.
622*18fd37a7SXin LI	(recurse, main) [DEBUG]: Remove main args.
623*18fd37a7SXin LI
624*18fd37a7SXin LI	* m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Change
625*18fd37a7SXin LI	wording of message.  Do not check for stdbool.h or ucontext.h,
626*18fd37a7SXin LI	or for ucontext_t or sigaction or sigaltstack.
627*18fd37a7SXin LI
628*18fd37a7SXin LI	* po/LINGUAS: Add zh_TW.
629*18fd37a7SXin LI
630*18fd37a7SXin LI	* Makefile.am (SUBDIRS): Add man.
631*18fd37a7SXin LI	* man/Makefile.am: New file.
632*18fd37a7SXin LI	* src/cmp.c (usage): Reword for help2man.
633*18fd37a7SXin LI	* src/diff.c (option_help_msgid): Likewise.
634*18fd37a7SXin LI	* src/diff3.c (option_help_msgid, usage): Likewise.
635*18fd37a7SXin LI	* src/sdiff3.c (option_help_msgid, usage): Likewise.
636*18fd37a7SXin LI	Reword for help2man.
637*18fd37a7SXin LI
638*18fd37a7SXin LI	* THANKS: Add email address for Tower.
639*18fd37a7SXin LI
640*18fd37a7SXin LI	* config/config.guess, config/config.sub, config/depcomp,
641*18fd37a7SXin LI	config/install-sh, config/mdate-sh, config/missing,
642*18fd37a7SXin LI	config/mkinstalldirs, config/texinfo.tex: Update
643*18fd37a7SXin LI	to recent version (maintained in other packages).
644*18fd37a7SXin LI
645*18fd37a7SXin LI2002-03-04  Bruno Haible <haible@ilog.fr>
646*18fd37a7SXin LI
647*18fd37a7SXin LI	* m4/gettext.m4 (AM_GNU_GETTEXT): Set LIBINTL and LTLIBINTL to empty if
648*18fd37a7SXin LI	no preinstalled GNU gettext was found.
649*18fd37a7SXin LI
650*18fd37a7SXin LI2002-03-02  Eli Zaretskii  <eliz@is.elta.co.il>
651*18fd37a7SXin LI
652*18fd37a7SXin LI	* ms/config.sed: Tweak editing of install-info-am and
653*18fd37a7SXin LI	uninstall-info-am targets, to include 8+3-butchered names of Info
654*18fd37a7SXin LI	files.
655*18fd37a7SXin LI
656*18fd37a7SXin LI2002-02-28  Paul Eggert  <eggert@twinsun.com>
657*18fd37a7SXin LI
658*18fd37a7SXin LI	* NEWS, configure.ac (AC_INIT, AM_INIT_AUTOMAKE): Version 2.7.8.
659*18fd37a7SXin LI
660*18fd37a7SXin LI	* doc/diff.texi: Add vr index.
661*18fd37a7SXin LI	Update copyright to 2002.
662*18fd37a7SXin LI	(Standards conformance): New chapter.
663*18fd37a7SXin LI	(Binary): Differing binary files are trouble unless the user asked for
664*18fd37a7SXin LI	brief output.
665*18fd37a7SXin LI	(Detailed Context): Prefer ISO time stamp format in discussion.
666*18fd37a7SXin LI	(Detailed Unified, Pagination): Likewise.
667*18fd37a7SXin LI	(Less Context): Likewise.  Also use short option.
668*18fd37a7SXin LI	(Alternate Names): Separate option from arg.
669*18fd37a7SXin LI	(Making Patches): Mention -U 2.
670*18fd37a7SXin LI	(diff Options): Deprecate -LINES, as POSIX 1003.1-2001 does not
671*18fd37a7SXin LI	allow it.
672*18fd37a7SXin LI
673*18fd37a7SXin LI	* INSTALLME: Update advice for Solaris installation problems.
674*18fd37a7SXin LI	We no longer use a test version of gettext.
675*18fd37a7SXin LI	Autoconf test version updated from 2.52f to 2.52h.
676*18fd37a7SXin LI	POSIX 1003.1-2001 patch for Automake.
677*18fd37a7SXin LI
678*18fd37a7SXin LI	* configure.ac (AC__GNU_SOURCE): Add this,
679*18fd37a7SXin LI	replacing AH_VERBATIM of _GNU_SOURCE.
680*18fd37a7SXin LI	(tempname): Use AC_LIBOBJS, not LIBOBJS=, as now required by autoconf.
681*18fd37a7SXin LI	(jm_PREREQ_C_STACK): Add.
682*18fd37a7SXin LI	(AC_CONFIG_FILES): Remove intl/Makefile.
683*18fd37a7SXin LI	(AM_GNU_GETTEXT): Add external arg, from gettext 0.11.
684*18fd37a7SXin LI
685*18fd37a7SXin LI	* lib/c-stack.c, lib/c-stack.h, lib/exitfail.c, lib/exitfail.h,
686*18fd37a7SXin LI	lib/posixver.c, lib/posixver.h, m4/c-stack.m4, m4/gnu-source.m4,
687*18fd37a7SXin LI	po/cs.po, po/ja.po: New files.
688*18fd37a7SXin LI
689*18fd37a7SXin LI	* intl/ChangeLog, intl/Makefile.in, intl/VERSION,
690*18fd37a7SXin LI	intl/bindtextdom.c, intl/config.charset, intl/dcgettext.c,
691*18fd37a7SXin LI	intl/dcigettext.c, intl/dcngettext.c, intl/dgettext.c,
692*18fd37a7SXin LI	intl/dngettext.c, intl/explodename.c, intl/finddomain.c,
693*18fd37a7SXin LI	intl/gettext.c, intl/gettextP.h, intl/gmo.h, intl/hash-string.h,
694*18fd37a7SXin LI	intl/intl-compat.c, intl/l10nflist.c, intl/libgnuintl.h,
695*18fd37a7SXin LI	intl/loadinfo.h, intl/loadmsgcat.c, intl/localcharset.c,
696*18fd37a7SXin LI	intl/locale.alias, intl/localealias.c, intl/localename.c,
697*18fd37a7SXin LI	intl/ngettext.c, intl/os2compat.c, intl/os2compat.h, intl/osdep.c,
698*18fd37a7SXin LI	intl/plural-eval.c, intl/plural-exp.c, intl/plural-exp.h,
699*18fd37a7SXin LI	intl/plural.c, intl/plural.y, intl/ref-add.sin, intl/ref-del.sin,
700*18fd37a7SXin LI	intl/textdomain.c, m4/isc-posix.m4, m4/libtool.m4: Remove.
701*18fd37a7SXin LI
702*18fd37a7SXin LI	* ABOUT-NLS: Update to Gettext 0.11.
703*18fd37a7SXin LI
704*18fd37a7SXin LI	* Makefile.am (SUBDIRS): Remove intl.
705*18fd37a7SXin LI
706*18fd37a7SXin LI	* config/config.guess, config/config.rpath, config/config.sub,
707*18fd37a7SXin LI	config/texinfo.tex, config/depcomp, config/texinfo.tex,
708*18fd37a7SXin LI	lib/tempname.c: Update to latest version from other packages.
709*18fd37a7SXin LI
710*18fd37a7SXin LI	* lib/xalloc.h (xalloc_exit_failure): Remove; subsumed by exit_failure.
711*18fd37a7SXin LI	* lib/xmalloc.c: Include exitfail.h.
712*18fd37a7SXin LI	(xalloc_exit_failure): Remove; subsumed by exit_failure.
713*18fd37a7SXin LI	All uses changed.
714*18fd37a7SXin LI
715*18fd37a7SXin LI	* lib/Makefile.am (noinst_HEADERS): Add c-stack.h, exitfail.h.
716*18fd37a7SXin LI	(libdiffutils_a_SOURCES): Add c-stack.c, exitfail.c, quotesys.c.
717*18fd37a7SXin LI	(INCLUDES): Remove.
718*18fd37a7SXin LI
719*18fd37a7SXin LI	* lib/cmpbuf.h (buffer_lcm): New arg LCM_MAX.
720*18fd37a7SXin LI	* lib/cmpbuf.c: Include errno.h.
721*18fd37a7SXin LI	(errno): Declare if !STDC_HEADERS.
722*18fd37a7SXin LI	Include signal.h.
723*18fd37a7SXin LI	(SA_RESTART): Define if not already defined.
724*18fd37a7SXin LI	Include <inttypes.h>.
725*18fd37a7SXin LI	(PTRDIFF_MAX): Define if not already defined.
726*18fd37a7SXin LI	(TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Likewise.
727*18fd37a7SXin LI	(block_read): Accommodate ancient AIX hosts that set errno to EINTR
728*18fd37a7SXin LI	after uncaught SIGCONT.
729*18fd37a7SXin LI	(buffer_lcm): Return a reasonable size if the multiple is too large.
730*18fd37a7SXin LI	New arg LCM_MAX.  All callers changed.
731*18fd37a7SXin LI
732*18fd37a7SXin LI	* lib/hard-locale.c: Include "hard-locale.h".
733*18fd37a7SXin LI	(hard_locale): Ignore ENABLE_NLS, since we want to operate on
734*18fd37a7SXin LI	locales other than LC_MESSAGES.
735*18fd37a7SXin LI
736*18fd37a7SXin LI	* m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_POSIXVER.
737*18fd37a7SXin LI	(jm_PREREQ_POSIXVER): New macro.
738*18fd37a7SXin LI
739*18fd37a7SXin LI	* m4/setmode.m4 (AC_FUNC_SETMODE_DOS):
740*18fd37a7SXin LI	Check for fcntl.h and unistd.h unconditionally.
741*18fd37a7SXin LI	Suggested by Bruno Haible.
742*18fd37a7SXin LI
743*18fd37a7SXin LI	* po/LINGUAS: Add cs, ja.
744*18fd37a7SXin LI	* po/POTFILES.in: Add lib/c-stack.c, src/dir.c.
745*18fd37a7SXin LI
746*18fd37a7SXin LI	* src/Makefile.am (datadir): @DATADIRNAME@ -> share.
747*18fd37a7SXin LI	(INCLUDES): Remove intl.
748*18fd37a7SXin LI	(LDADD): Change INTLLIBS to LIBINTL.
749*18fd37a7SXin LI	No longer need to link libdiffutils.a twice.
750*18fd37a7SXin LI
751*18fd37a7SXin LI	* src/analyze.c (diff_2_files):
752*18fd37a7SXin LI	Avoid arithmetic overflow in buffer size calculation.
753*18fd37a7SXin LI
754*18fd37a7SXin LI	* src/cmp.c: Include c-stack.h, exitfail.h.
755*18fd37a7SXin LI	(hard_locale_LC_MESSAGES): Depend on ENABLE_NLS.
756*18fd37a7SXin LI	(try_help, check_stdout, main, cmp): 2 -> EXIT_TROUBLE.
757*18fd37a7SXin LI	(main): Check for stack overflow.
758*18fd37a7SXin LI	0 -> EXIT_SUCCESS.
759*18fd37a7SXin LI	1 -> EXIT_FAILURE.
760*18fd37a7SXin LI	(cmp): Likewise.
761*18fd37a7SXin LI	Accommodate ancient AIX hosts that set errno to
762*18fd37a7SXin LI	EINTR after uncaught SIGCONT.
763*18fd37a7SXin LI
764*18fd37a7SXin LI	* src/context.c (pr_context_hunk):
765*18fd37a7SXin LI	Do not dump core if an enormous context causes an
766*18fd37a7SXin LI	arithmetic overflow.
767*18fd37a7SXin LI	(pr_unidiff_hunk): Likewise.
768*18fd37a7SXin LI	(find_hunk): Likewise.
769*18fd37a7SXin LI
770*18fd37a7SXin LI	* src/diff.h: unsigned -> unsigned int.
771*18fd37a7SXin LI	* src/diff.c: Include c-stack.h, exitfail.h.
772*18fd37a7SXin LI	Do not include signal.h.
773*18fd37a7SXin LI	(specify_style, specify_value): Bring these routines back, as POSIX
774*18fd37a7SXin LI	requires that the order of options not matter.
775*18fd37a7SXin LI	(shortopts): New constant.
776*18fd37a7SXin LI	(group_format_option, line_format_option): New constants.
777*18fd37a7SXin LI	(main): 0 -> EXIT_SUCCESS, 1 -> EXIT_FAILURE, 2 -> EXIT_TROUBLE.
778*18fd37a7SXin LI	Ensure that order of options does not matter.
779*18fd37a7SXin LI	Check for stack overflow.
780*18fd37a7SXin LI	If contexts overflow, substitute LIN_MAX, as that's good enough.
781*18fd37a7SXin LI	If multiple contexts are specified, use their maximum.
782*18fd37a7SXin LI	-c is equivalent to -C 3 now, instead of having an implicit context;
783*18fd37a7SXin LI	likewise for -u and -U 3.
784*18fd37a7SXin LI	Use specify_style and specify_value.
785*18fd37a7SXin LI	(SIGCHLD): Do not define; now done in a header.
786*18fd37a7SXin LI	Use new style time stamp format for -u / -U.
787*18fd37a7SXin LI	Reject numeric-string options if operating in POSIX 1003.1-2001 mode.
788*18fd37a7SXin LI	Avoid overflow problems with tab width.
789*18fd37a7SXin LI	Simplify from-file and to-file code.
790*18fd37a7SXin LI	(usage): Do not mention obsolete options.
791*18fd37a7SXin LI	(filetype): Do not mention whether a file is executable.
792*18fd37a7SXin LI	Add typed memory objects.
793*18fd37a7SXin LI	(compare_files): 0 -> EXIT_SUCCESS, 1 -> EXIT_FAILURE, 2 ->
794*18fd37a7SXin LI	EXIT_TROUBLE.
795*18fd37a7SXin LI
796*18fd37a7SXin LI	* src/diff3.c: Include c-stack.h, exitfail.h.
797*18fd37a7SXin LI	(ALLOCATE): Remove.  All uses changed to xmalloc, or to xmalloc plus
798*18fd37a7SXin LI	an overflow check.
799*18fd37a7SXin LI	(myread): Remove.
800*18fd37a7SXin LI	(main): Check for stack overflow.
801*18fd37a7SXin LI	0 -> EXIT_SUCCESS, 1 -> EXIT_FAIULRE, 2 -> EXIT_TROUBLE.
802*18fd37a7SXin LI	(try_help): Likewise.
803*18fd37a7SXin LI	(process_diff): Check for integer overflow, to avoid core dumps.
804*18fd37a7SXin LI	2 -> EXIT_TROUBLE.
805*18fd37a7SXin LI	(read_diff): Exit with status 126 if the file is not executable,
806*18fd37a7SXin LI	for compatibility with POSIX 1003.1-2001.
807*18fd37a7SXin LI	Accommodate ancient AIX hosts that set errno to EINTR after uncaught
808*18fd37a7SXin LI	SIGCONT.
809*18fd37a7SXin LI	Check for integer overflow to avoid core dumps.
810*18fd37a7SXin LI	(fatal, perror_with_exit): 2 -> EXIT_TROUBLE.
811*18fd37a7SXin LI
812*18fd37a7SXin LI	* src/dir.c (dir_read):
813*18fd37a7SXin LI	Ignore st_size of directories: POSIX says it's garbage.
814*18fd37a7SXin LI	Check for integer overflow to avoid core dumps.
815*18fd37a7SXin LI	(diff_dirs): 0 -> EXIT_SUCCESS, 2 -> EXIT_TROUBLE.
816*18fd37a7SXin LI
817*18fd37a7SXin LI	* src/ifdef.c: Include <xalloc.h>.
818*18fd37a7SXin LI	(format_group, print_ifdef_lines): Avoid core dumps with bad formats.
819*18fd37a7SXin LI	(do_printf_spec): Avoid alloca.
820*18fd37a7SXin LI
821*18fd37a7SXin LI	* src/io.c (sip):
822*18fd37a7SXin LI	Avoid integer overflow and core dumps if buffer alignments are
823*18fd37a7SXin LI	preposterously incompatible.
824*18fd37a7SXin LI	(slurp): Do not dump core if the file is growing as we read it.
825*18fd37a7SXin LI	If a regular file grows, keep reading until we catch up with its EOF.
826*18fd37a7SXin LI	(find_and_hash_each_line): Check for integer overflow to avoid cores.
827*18fd37a7SXin LI	(GUESS_LINES): Remove.
828*18fd37a7SXin LI	(guess_lines): New function.  Avoid integer overflow.
829*18fd37a7SXin LI	(find_identical_ends): Use it.
830*18fd37a7SXin LI	Avoid integer overflow and possible core dumps.
831*18fd37a7SXin LI
832*18fd37a7SXin LI	* src/sdiff.c: Include c-stack.h, exitfail.h.  Do not include signal.h.
833*18fd37a7SXin LI	0 -> EXIT_SUCCESS, 1 -> EXIT_FAILURE, 2 -> EXIT_TROUBLE.
834*18fd37a7SXin LI	(ck_editor_status): New function.
835*18fd37a7SXin LI	(main): Check for stack overflow.
836*18fd37a7SXin LI	Adopt POSIX convention for subsidiary programs not found.
837*18fd37a7SXin LI	(diffarg): Check for integer overflow to avoid core dumps.
838*18fd37a7SXin LI	(trapsigs): Remove SA_INTERRUPT special case; now done by header.
839*18fd37a7SXin LI	(SIGCHLD): Likewise.
840*18fd37a7SXin LI	(edit): Adopt POSIX convention for subsidiary programs not found.
841*18fd37a7SXin LI
842*18fd37a7SXin LI	* src/side.c: unsigned -> unsigned int.
843*18fd37a7SXin LI
844*18fd37a7SXin LI	* src/system.h: Don't use alloca or include <alloca.h>.
845*18fd37a7SXin LI	unsigned -> unsigned int
846*18fd37a7SXin LI	(EXIT_SUCCESS, EXIT_FAILURE, EXIT_TROUBLE): Define if not defined.
847*18fd37a7SXin LI	Include signal.h.
848*18fd37a7SXin LI	(SA_RESTART): Define if not defined.
849*18fd37a7SXin LI	(SIGCHLD): Likewise.
850*18fd37a7SXin LI
851*18fd37a7SXin LI	* src/util.c: 2 -> EXIT_TROUBLE.
852*18fd37a7SXin LI	Adopt POSIX convention for ENOEXEC and exit status 126.
853*18fd37a7SXin LI	unsigned -> unsigned int
854*18fd37a7SXin LI
855*18fd37a7SXin LI2002-01-24  Paul Eggert  <eggert@twinsun.com>
856*18fd37a7SXin LI
857*18fd37a7SXin LI	* NEWS, configure.ac (AC_INIT, AM_INIT_AUTOMAKE): Version 2.7.7.
858*18fd37a7SXin LI
859*18fd37a7SXin LI	* intl/plural.c: Regenerate with Bison 1.31.
860*18fd37a7SXin LI
861*18fd37a7SXin LI	* ABOUT-NLS, intl/*: Update to Gettext 0.11-pre5++.
862*18fd37a7SXin LI	* INSTALL: Update to Autoconf 2.52f.
863*18fd37a7SXin LI
864*18fd37a7SXin LI	* INSTALLME: New file.
865*18fd37a7SXin LI	* Makefile.am (EXTRA_DIST): Add config/config.rpath, INSTALLME.
866*18fd37a7SXin LI	(DISTCLEANFILES): Remove.
867*18fd37a7SXin LI	* NEWS: Reformat for imminent 2.8 release.
868*18fd37a7SXin LI	* README: Mention INSTALLME.
869*18fd37a7SXin LI	* README-alpha: Move most of contents to INSTALLME.
870*18fd37a7SXin LI	* THANKS: Add Bruno Haible, Jim Meyering, and Eli Zaretskii.
871*18fd37a7SXin LI
872*18fd37a7SXin LI	* config: New subdirectory, containing the following files from .:
873*18fd37a7SXin LI	config.guess, config.sub, depcomp, missing, install-sh, mkinstalldirs.
874*18fd37a7SXin LI	Move the following files here from doc: texinfo.tex, mdate-sh.
875*18fd37a7SXin LI	* config/config.guess, config/config.sub, config/texinfo.tex:
876*18fd37a7SXin LI	Update to latest version from FSF.
877*18fd37a7SXin LI	* config/config.rpath: New file, from Gettext 0.11-pre5++.
878*18fd37a7SXin LI
879*18fd37a7SXin LI	* configure.ac (AC_INIT): Use new 3-arg form.
880*18fd37a7SXin LI	(AC_CONFIG_SRCDIR): Specify src/diff.c here, not in AC_INIT.
881*18fd37a7SXin LI	(ALL_LINGUAS): Remove: now in po/LINGUAS as per Gettext 0.11.
882*18fd37a7SXin LI	(AC_CONFIG_AUX_DIR): New macro invocation.
883*18fd37a7SXin LI
884*18fd37a7SXin LI	* lib/Makefile.am (noinst_HEADERS): Add gettext.h.
885*18fd37a7SXin LI	* lib/gettext.h: New file, from Gettext 0.11-pre5++.
886*18fd37a7SXin LI	* lib/prepargs.c: Include <string.h>.  Reported by Bruno Haible.
887*18fd37a7SXin LI
888*18fd37a7SXin LI	* m4/codeset.m4, m4/gettext.m4, glibc21.m4, iconv.m4, isc-posix.m4,
889*18fd37a7SXin LI	lcmessage.m4, progtest.m4: Upgrade to Gettext 0.11-pre5++.
890*18fd37a7SXin LI	* m4/lib-ld.m4, m4/lib-link.m4, m4/lib-prefix.m4: New files, from
891*18fd37a7SXin LI	Gettext 0.11-pre5++.
892*18fd37a7SXin LI
893*18fd37a7SXin LI	* po/LINGUAS: New file.
894*18fd37a7SXin LI	* po/Makefile.in.in: Upgrade to Gettext 0.11-pre5++.
895*18fd37a7SXin LI	* po/Makevars, po/Rules-quot, po/boldquot.sed: New files,
896*18fd37a7SXin LI	from Gettext 0.11-pre5++.
897*18fd37a7SXin LI
898*18fd37a7SXin LI	* src/cmp.c (copyright_string): Update to 2002.
899*18fd37a7SXin LI	* src/diff.c (copyright_string): Likewise.
900*18fd37a7SXin LI	* src/diff3.c (copyright_string): Likewise.
901*18fd37a7SXin LI	* src/sdiff.c (copyright_string): Likewise.
902*18fd37a7SXin LI
903*18fd37a7SXin LI	* src/cmp.c (specify_ignore_initial): Renamed from
904*18fd37a7SXin LI	parse_ignore_initial, with different signature, to take the
905*18fd37a7SXin LI	maximum of multiple options rather than the last one.
906*18fd37a7SXin LI	All uses changed.
907*18fd37a7SXin LI
908*18fd37a7SXin LI	* src/cmp.c (bytes, specify_ignore_initial, cmp): Use UINTMAX_MAX
909*18fd37a7SXin LI	instead of (uintmax_t) -1, to avoid warnings on some compilers.
910*18fd37a7SXin LI	* src/io.c (file_block_read): Likewise, for SIZE_MAX.
911*18fd37a7SXin LI
912*18fd37a7SXin LI	* src/cmp.c (usage): Reformat messages to ease translation.
913*18fd37a7SXin LI	* src/diff3.c (usage): Likewise.
914*18fd37a7SXin LI	* src/sdiff.c (usage): Likewise.
915*18fd37a7SXin LI
916*18fd37a7SXin LI	* src/cmp.c (main): Two files with the same name are identical
917*18fd37a7SXin LI	only if the same offset is specified.
918*18fd37a7SXin LI	(block_compare_and_count): Avoid cast to unsigned char.
919*18fd37a7SXin LI
920*18fd37a7SXin LI	* src/diff3.c (main): Remove unused variable.
921*18fd37a7SXin LI
922*18fd37a7SXin LI	* src/dir.c: Include <setjmp.h>
923*18fd37a7SXin LI	(struct dirdata): New member nnames.
924*18fd37a7SXin LI	(locale_specific_sorting, failed_strcoll): New vars.
925*18fd37a7SXin LI	(dir_read): Renamed from dir_sort.  Don't sort the dir.
926*18fd37a7SXin LI	Set new nnames member of struct dirdata.  All callers changed.
927*18fd37a7SXin LI	(compare_names): Don't check for errno after strcasecmp.
928*18fd37a7SXin LI	Use strcoll only if locale_specific_sorting is nonzero.
929*18fd37a7SXin LI	If strcoll fails, longjmp out rather than returning a value
930*18fd37a7SXin LI	that might result in an invalid comparison function that might
931*18fd37a7SXin LI	make qsort dump core.
932*18fd37a7SXin LI	(diff_dirs): Sort the directory ourselves.  Use setjmp to recover
933*18fd37a7SXin LI	from strcoll failure, falling back on native byte comparison.
934*18fd37a7SXin LI	Make local variables volatile if they need to preserve their value
935*18fd37a7SXin LI	after setjmp/longjmp.
936*18fd37a7SXin LI
937*18fd37a7SXin LI	* src/sdiff.c (handler_index_of_SIGINT, handler_index_of_SIGPIPE):
938*18fd37a7SXin LI	New macros.
939*18fd37a7SXin LI	(main): Do not confuse signal numbers with their indices.
940*18fd37a7SXin LI	Bug reported by Bruno Haible.
941*18fd37a7SXin LI	(edit): Cat lin to long before printing with %ld, since lin might
942*18fd37a7SXin LI	be narrow than long.
943*18fd37a7SXin LI
944*18fd37a7SXin LI	* src/system.h (UINTMAX_MAX): New macro.
945*18fd37a7SXin LI	Include gettext.h, not libgettext.h.
946*18fd37a7SXin LI	(N_): Do not wrap arg in parentheses.  Fix from Bruno Haible.
947*18fd37a7SXin LI
948*18fd37a7SXin LI	* src/util.c (finish_output): Ensure that werrno is initialized.
949*18fd37a7SXin LI	(lines_differ): Have an explicit do-nothing case for
950*18fd37a7SXin LI	IGNORE_NO_WHITE_SPACE, to pacify gcc -Wall.
951*18fd37a7SXin LI
952*18fd37a7SXin LI2001-12-29  Eli Zaretskii  <eliz@is.elta.co.il>
953*18fd37a7SXin LI
954*18fd37a7SXin LI	* src/sdiff.c (interact): After extracting rlen from the editor
955*18fd37a7SXin LI	command, test for a terminating null character, not for a newline.
956*18fd37a7SXin LI
957*18fd37a7SXin LI	* ms/config.bat: Allow longer source directory names without
958*18fd37a7SXin LI	overflowing the line length limits.  Create the cache in the
959*18fd37a7SXin LI	build directory, not in the source directory
960*18fd37a7SXin LI	* ms/config.sed: Fix AC_CONFIG_LINKS for when symlinks are
961*18fd37a7SXin LI	unavailable.
962*18fd37a7SXin LI
963*18fd37a7SXin LI2001-12-23  Paul Eggert  <eggert@twinsun.com>
964*18fd37a7SXin LI
965*18fd37a7SXin LI	* NEWS, configure.ac (AM_INIT_AUTOMAKE): Version 2.7.6.
966*18fd37a7SXin LI
967*18fd37a7SXin LI	* configure.ac (ALL_LINGUAS): Add tr.
968*18fd37a7SXin LI
969*18fd37a7SXin LI	* src/util.c (begin_output):
970*18fd37a7SXin LI	Have child exit with status 127 rather than reporting
971*18fd37a7SXin LI	failure on its own.  Set errno to 0 before invoking popen.
972*18fd37a7SXin LI	(finish_output): Report errno on pclose failure.
973*18fd37a7SXin LI	Distinguish between subsidiary program not found, and failure.
974*18fd37a7SXin LI
975*18fd37a7SXin LI	* src/sdiff.c (not_found, execdiff): Remove.
976*18fd37a7SXin LI	(DIFF_PROGRAM_OPTION): New constant.
977*18fd37a7SXin LI	(longopts, option_help_msgid, main): Add --diff-program=PROGRAM.
978*18fd37a7SXin LI	(check_stdout): New function.
979*18fd37a7SXin LI	(main): Remove DIFF_PROGRAM.  Check stdout after printing version.
980*18fd37a7SXin LI	Use check_stdout after printing help.  Use execvp/perror_fatail rather
981*18fd37a7SXin LI	than execdiff.  Set errno to 0 before invoking popen.
982*18fd37a7SXin LI	Check for pclose failure properly.
983*18fd37a7SXin LI	(main, edit): If child exec fails, exit with 127 rather than trying to
984*18fd37a7SXin LI	print diagnostic.
985*18fd37a7SXin LI	Distinguish between subsidiary program failing and not being found.
986*18fd37a7SXin LI	(edit): Handle signals the same way, regardless of whether we're using
987*18fd37a7SXin LI	system or fork+exec.  Check for system returning -1.
988*18fd37a7SXin LI
989*18fd37a7SXin LI	* src/diff3.c (DIFF_PROGRAM_OPTION, HELP_OPTION): New constants.
990*18fd37a7SXin LI	(longopts, main): Use them.
991*18fd37a7SXin LI	(longopts, main, option_help_msgid): New option --diff-option=PROGRAM.
992*18fd37a7SXin LI	(main): Remove DIFF_PROGRAM support.
993*18fd37a7SXin LI	Check stdout after printing version.
994*18fd37a7SXin LI	(check_stdout): Report errno info if fclose fails.
995*18fd37a7SXin LI	(read_diff): Have child exit with status 127 when program is not found,
996*18fd37a7SXin LI	rather than trying to have the child report failure.  Check for
997*18fd37a7SXin LI	pclose returning -1.
998*18fd37a7SXin LI
999*18fd37a7SXin LI	* src/diff.c (DEFAULT_WIDTH): Remove.
1000*18fd37a7SXin LI	(main): Use 130 instead of DEFAULT_WIDTH, since it's not really
1001*18fd37a7SXin LI	builder-settable.  Do not prepend DIFF_OPTIONS.
1002*18fd37a7SXin LI	(check-stdout): If fclose (stdout) fails, print errno info.
1003*18fd37a7SXin LI	(option_help_msgid): Default context is 3, not 2.
1004*18fd37a7SXin LI	(usage): Work even if ptrdiff_t is wider than int.
1005*18fd37a7SXin LI
1006*18fd37a7SXin LI	* doc/diff.texi (diff Options): Remove DIFF_OPTIONS.
1007*18fd37a7SXin LI	(Invoking diff3, Invoking sdiff): Remove DIFF_PROGRAM.
1008*18fd37a7SXin LI	(diff3 Options, sdiff Options): Add --diff-program.
1009*18fd37a7SXin LI
1010*18fd37a7SXin LI	* src/cmp.c (valid_suffixes):
1011*18fd37a7SXin LI	Add '0', to support suffixes like "MB" and "MiB".
1012*18fd37a7SXin LI	(check_stdout): Don't assume that the translations of "write failed"
1013*18fd37a7SXin LI	and of "standard output" lack '%'.
1014*18fd37a7SXin LI	(main): Check stdout after printing version.
1015*18fd37a7SXin LI
1016*18fd37a7SXin LI	* lib/setmode.c: [HAVE_FCNTL_H && HAVE_SETMODE_DOS]: Include <fcntl.h>.
1017*18fd37a7SXin LI	[!HAVE_SETMODE_DOS]: Do not include <unistd.h>.
1018*18fd37a7SXin LI	(set_binary_mode): Return mode (not 1) if fd is a tty.
1019*18fd37a7SXin LI	Do not assume that O_TEXT is zero.
1020*18fd37a7SXin LI
1021*18fd37a7SXin LI	* doc/diff.texi (cmp Options):
1022*18fd37a7SXin LI	In byte counts, a plain suffix (without any integer)
1023*18fd37a7SXin LI	is assumed to modify the integer 1.  Index terms like "kibibyte".
1024*18fd37a7SXin LI	Document plain "k".
1025*18fd37a7SXin LI
1026*18fd37a7SXin LI	(Reporting Bugs): Mention bug-report archive and test version
1027*18fd37a7SXin LI	location.  Ask for "diff --version" in bug reports.
1028*18fd37a7SXin LI
1029*18fd37a7SXin LI2001-12-13  Paul Eggert  <eggert@twinsun.com>
1030*18fd37a7SXin LI
1031*18fd37a7SXin LI	* src/diff.c (DEFAULT_WIDTH): Remove; couldn't be changed without
1032*18fd37a7SXin LI	also changing option_help_msgid.  All uses replaced with 130.
1033*18fd37a7SXin LI
1034*18fd37a7SXin LI	* lib/setmode.c: Include fcntl.h and unistd.h only if
1035*18fd37a7SXin LI	HAVE_SETMODE_DOS.
1036*18fd37a7SXin LI	(setmode): Assume a file is binary unless the mode is O_TEXT.
1037*18fd37a7SXin LI	* ms/README: Fix minor typos.
1038*18fd37a7SXin LI
1039*18fd37a7SXin LI2001-12-13  Eli Zaretskii  <eliz@is.elta.co.il>
1040*18fd37a7SXin LI
1041*18fd37a7SXin LI	* ms/README: New file.
1042*18fd37a7SXin LI
1043*18fd37a7SXin LI	* lib/setmode.c (set_binary_mode) [HAVE_SETMODE_DOS]: Don't assume
1044*18fd37a7SXin LI	O_TEXT has a zero value.  If FD is a terminal device, do nothing
1045*18fd37a7SXin LI	and return MODE, thus pretending that it was already in the
1046*18fd37a7SXin LI	requested MODE.
1047*18fd37a7SXin LI	[HAVE_FCNTL_H]: Include fcntl.h (needed for O_BINARY).
1048*18fd37a7SXin LI
1049*18fd37a7SXin LI	* ms/config.sed: Remove the split prevention of config.status.
1050*18fd37a7SXin LI	Fix Sed commands for converting absolute file names into
1051*18fd37a7SXin LI	top_srcdir-relative ones.
1052*18fd37a7SXin LI
1053*18fd37a7SXin LI	* ms/config.bat: Fix typos.
1054*18fd37a7SXin LI
1055*18fd37a7SXin LI2001-12-12  Neal H Walfield  <neal@cs.uml.edu>
1056*18fd37a7SXin LI
1057*18fd37a7SXin LI	* diff.c (option_help_msgid): Correct the default context width
1058*18fd37a7SXin LI	from 2 to 3.
1059*18fd37a7SXin LI
1060*18fd37a7SXin LI2001-12-11  Paul Eggert  <eggert@twinsun.com>
1061*18fd37a7SXin LI
1062*18fd37a7SXin LI	* m4/Makefile.am.in: Remove jm-glibc-io.m4
1063*18fd37a7SXin LI
1064*18fd37a7SXin LI	* NEWS, configure.ac (AM_INIT_AUTOMAKE): Version 2.7.5.
1065*18fd37a7SXin LI
1066*18fd37a7SXin LI	* configure.ac (PR_PROGRAM): Use AC_DEFINE_UNQUOTED, so that
1067*18fd37a7SXin LI	$PR_PROGRAM is expanded by sh.
1068*18fd37a7SXin LI	(ptrdiff_t, ssize_t): Use AC_CHECK_TYPE with a default of int,
1069*18fd37a7SXin LI	not AC_CHECK_TYPES.
1070*18fd37a7SXin LI	(jm_AC_DOS, AC_FUNC_SETMODE_DOS): New macros.
1071*18fd37a7SXin LI	(AC_CONFIG_FILES): Add ms/Makefile.
1072*18fd37a7SXin LI
1073*18fd37a7SXin LI	* doc/diff.texi: Add --no-ignore-file-name-case.
1074*18fd37a7SXin LI	File name case sensitivity now affects file name exclusion.
1075*18fd37a7SXin LI	Fix typos.
1076*18fd37a7SXin LI
1077*18fd37a7SXin LI	* src/util.c: Include dirname.h.
1078*18fd37a7SXin LI	(dir_file_pathname): Use base_name rather than file_name_lastdirchar.
1079*18fd37a7SXin LI
1080*18fd37a7SXin LI	* src/system.h (S_IXUSR, S_IXGRP, S_IXOTH): New macros.
1081*18fd37a7SXin LI	Include <libgettext.h> rather than rolling it ourselves.
1082*18fd37a7SXin LI	(file_name_lastdirchar, HAVE_SETMODE, set_binary_mode): Remove.
1083*18fd37a7SXin LI
1084*18fd37a7SXin LI	* src/sdiff.c: Include <dirname.h>.
1085*18fd37a7SXin LI	(expand_name): Use base_name rather than file_name_lastdirchar, for
1086*18fd37a7SXin LI	portability to DOS.
1087*18fd37a7SXin LI	(main): Initialize xalloc_exit_failure before possibly invoking
1088*18fd37a7SXin LI	any memory allocator.
1089*18fd37a7SXin LI
1090*18fd37a7SXin LI	* src/io.c: Include setmode.h.
1091*18fd37a7SXin LI
1092*18fd37a7SXin LI	* src/diff3.c (main):
1093*18fd37a7SXin LI	Initialize xalloc_exit_failure before possibly invoking any memory
1094*18fd37a7SXin LI	allocator.
1095*18fd37a7SXin LI
1096*18fd37a7SXin LI	* src/diff.c: Include dirname.h, setmode.h.
1097*18fd37a7SXin LI
1098*18fd37a7SXin LI	(main): Later values and/or styles now silently override earlier.
1099*18fd37a7SXin LI	(specify_value, specify_style): Likewise.  All callers changed.
1100*18fd37a7SXin LI	Remove.
1101*18fd37a7SXin LI	(binary, main, option_help_msgid, compare_files):
1102*18fd37a7SXin LI	HAVE_SETMODE -> HAVE_SETMODE_DOS.
1103*18fd37a7SXin LI	(NO_IGNORE_FILE_NAME_CASE_OPTION): New constant.
1104*18fd37a7SXin LI	(longopts, main, option_help_msgid): Support it.
1105*18fd37a7SXin LI	(exclude_options): New function.
1106*18fd37a7SXin LI	(main): Use it. Initialize xalloc_exit_failure before potentially
1107*18fd37a7SXin LI	allocating memory.
1108*18fd37a7SXin LI
1109*18fd37a7SXin LI	(filetype): Distinguish executable files from others, as POSIX
1110*18fd37a7SXin LI	suggests.
1111*18fd37a7SXin LI
1112*18fd37a7SXin LI	(compare_files): Use base_name instead of file_name_lastdirchar.
1113*18fd37a7SXin LI
1114*18fd37a7SXin LI	* src/cmp.c: Include <hard-locale.h>, <setmode.h>.
1115*18fd37a7SXin LI	(hard_locale_LC_MESSAGES): New macro.
1116*18fd37a7SXin LI	(sprintc): Remove int width arg; it's now the caller's responsibility
1117*18fd37a7SXin LI	to pad.  All callers changed.
1118*18fd37a7SXin LI	(stat_buf): New static var; was formerly a local var in 'main'.
1119*18fd37a7SXin LI	(valid_suffixes): Add 'K', for 'KiB'.
1120*18fd37a7SXin LI	(option_help_msgid): Don't confuse bytes with characters.
1121*18fd37a7SXin LI	(main): Set xalloc_exit_failure before invoking anything that might
1122*18fd37a7SXin LI	allocate memory.  Fix bug: -n was incorrectly ignored when optimizing
1123*18fd37a7SXin LI	the case of regular files with different lengths.
1124*18fd37a7SXin LI	(cmp): Use an index column wide enough to store this comparison's
1125*18fd37a7SXin LI	indexes.  In locales other than the POSIX locale, say "byte"
1126*18fd37a7SXin LI	rather than "char".
1127*18fd37a7SXin LI
1128*18fd37a7SXin LI	* ms/config.bat: pc -> ms
1129*18fd37a7SXin LI
1130*18fd37a7SXin LI	* ms/Makefile.am, m4/setmode.m4, lib/setmode.c, lib/setmode.h:
1131*18fd37a7SXin LI	New file.
1132*18fd37a7SXin LI
1133*18fd37a7SXin LI	* lib/Makefile.am (noinst_HEADERS): Add dirname.h, setmode.h.
1134*18fd37a7SXin LI	(libdiffutils_a_SOURCES): Add basename.c, setmode.c.
1135*18fd37a7SXin LI
1136*18fd37a7SXin LI	* Makefile.am (SUBDIRS): Add ms.
1137*18fd37a7SXin LI
1138*18fd37a7SXin LI2001-12-10  Paul Eggert  <eggert@twinsun.com>
1139*18fd37a7SXin LI
1140*18fd37a7SXin LI	* m4/fnmatch.m4: Test for FNM_CASEFOLD.
1141*18fd37a7SXin LI
1142*18fd37a7SXin LI2001-12-03  Paul Eggert  <eggert@twinsun.com>
1143*18fd37a7SXin LI
1144*18fd37a7SXin LI	* lib/posix/regex.h: Fix copyright notice.
1145*18fd37a7SXin LI
1146*18fd37a7SXin LI2001-12-03  Paul Eggert  <eggert@twinsun.com>
1147*18fd37a7SXin LI
1148*18fd37a7SXin LI	* NEWS, configure.ac (AM_INIT_AUTOMAKE): Version 2.7.4.
1149*18fd37a7SXin LI
1150*18fd37a7SXin LI	* diff.texi (direntry, Overview, Comparison, Binary, Invoking cmp):
1151*18fd37a7SXin LI	Use "byte" rather than "character" when talking about cmp, since
1152*18fd37a7SXin LI	it compares bytes, not character.
1153*18fd37a7SXin LI	(Invoking cmp): New trailing operands FROM-SKIP and TO-SKIP.
1154*18fd37a7SXin LI	-i or --ignore-initial now accepts FROM-SKIP:TO-SKIP.
1155*18fd37a7SXin LI	New option -n or --bytes.
1156*18fd37a7SXin LI	Count operands now may be in octal or hex, and may be followed by a
1157*18fd37a7SXin LI	size multiplier.
1158*18fd37a7SXin LI
1159*18fd37a7SXin LI	* configure.ac (DEFAULT_DIFF_PROGRAM):
1160*18fd37a7SXin LI	Define to "diff", not "$bindir/diff" (which didn't work anyway).
1161*18fd37a7SXin LI	(AC_CHECK_MEMBERS): Add struct stat.st_blksize, struct stat.st_rdev.
1162*18fd37a7SXin LI	(AC_STRUCT_ST_BLKSIZE, AC_STRUCT_ST_RDEV): Remove; obsolescent.
1163*18fd37a7SXin LI	(AC_FUNC_FORK): Use this, instead of obsolescent AC_FUNC_VFORK.
1164*18fd37a7SXin LI	(AC_CONFIG_FILES, AC_CONFIG_COMMANDS): Add.
1165*18fd37a7SXin LI	(AC_OUTPUT): Remove args; they were obsolescent.
1166*18fd37a7SXin LI
1167*18fd37a7SXin LI	* util.c (setup_output, begin_output, finish_output):
1168*18fd37a7SXin LI	HAVE_FORK -> HAVE_WORKING_FORK || HAVE_WORKING_VFORK.
1169*18fd37a7SXin LI	* sdiff.c (diffpid, cleanup, main, edit): Likewise.
1170*18fd37a7SXin LI	* diff3.c (read_diff): Likewise.
1171*18fd37a7SXin LI
1172*18fd37a7SXin LI	* system.h (STAT_BLOCKSIZE):
1173*18fd37a7SXin LI	Use HAVE_STRUCT_STAT_ST_BLKSIZE, not HAVE_ST_BLKSIZE.
1174*18fd37a7SXin LI	(vfork): New macro.
1175*18fd37a7SXin LI	(HAVE_FORK): Remove.
1176*18fd37a7SXin LI	(set_binary_mode): New macro.
1177*18fd37a7SXin LI
1178*18fd37a7SXin LI	* sdiff.c (main): HAVE_VFORK -> HAVE_WORKING_VFORK.
1179*18fd37a7SXin LI	(edit): Reopen the temporary file after the editor has run, in case
1180*18fd37a7SXin LI	the editor operates by unlinking the old file and linking a new one.
1181*18fd37a7SXin LI	(P_tmpdir): Rename from PVT_tmpdir; this fixes a typo.
1182*18fd37a7SXin LI	All uses changed.
1183*18fd37a7SXin LI
1184*18fd37a7SXin LI	* io.c (sip, read_files):
1185*18fd37a7SXin LI	Remove tests for HAVE_SETMODE; use set_binary_mode
1186*18fd37a7SXin LI	instead of setmode.
1187*18fd37a7SXin LI	(sip): Fix typo in backward lseek when reverting to text mode.
1188*18fd37a7SXin LI
1189*18fd37a7SXin LI	* config.site, config.sed, config.bat: New file.
1190*18fd37a7SXin LI
1191*18fd37a7SXin LI	* Makefile.am (EXTRA_DIST): Add xstrtol.c.
1192*18fd37a7SXin LI	(noinst_HEADERS): Add xstrtol.h.
1193*18fd37a7SXin LI	(libdiffutils_a_SOURCES): Add xstrtoumax.c.
1194*18fd37a7SXin LI
1195*18fd37a7SXin LI	* cmp.c: <xstrtol.h>: Include.
1196*18fd37a7SXin LI	(ignore_initial): Now an array with 2 elements.  All uses changed.
1197*18fd37a7SXin LI	(bytes): New var.
1198*18fd37a7SXin LI	(HELP_OPTION): New constant.
1199*18fd37a7SXin LI	(long_options, main): Use it.
1200*18fd37a7SXin LI	(long_options, option_help_msgid, main, cmp):
1201*18fd37a7SXin LI	Add support for -n or --bytes.
1202*18fd37a7SXin LI	(parse_ignore_initial): New function.
1203*18fd37a7SXin LI	(option_help_msgid, main): Add -i M:N.
1204*18fd37a7SXin LI	(usage, main): Add two optional trailing operands, a la BSD.
1205*18fd37a7SXin LI	(main): setmode -> set_binary_mode.
1206*18fd37a7SXin LI	(cmp): Report byte number of what we've seen, not of the entire file.
1207*18fd37a7SXin LI	This is to be consistent with the line number, which is always relative
1208*18fd37a7SXin LI	with what we've seen.
1209*18fd37a7SXin LI
1210*18fd37a7SXin LI2001-12-02  Paul Eggert  <eggert@twinsun.com>
1211*18fd37a7SXin LI
1212*18fd37a7SXin LI	* diff.c (main, compare_files): setmode -> set_binary_mode.
1213*18fd37a7SXin LI
1214*18fd37a7SXin LI	* xstrtol.c (__xstrtol): Don't accept 'Ki'; require 'KiB'.
1215*18fd37a7SXin LI
1216*18fd37a7SXin LI	* xstrtol.c (__xstrtol): Add support for IEC 60027-2.
1217*18fd37a7SXin LI
1218*18fd37a7SXin LI2001-11-25  Paul Eggert  <eggert@twinsun.com>
1219*18fd37a7SXin LI
1220*18fd37a7SXin LI	* NEWS, configure.ac (AM_INIT_AUTOMAKE): Version 2.7.3.
1221*18fd37a7SXin LI
1222*18fd37a7SXin LI	* README-alpha: New file.
1223*18fd37a7SXin LI
1224*18fd37a7SXin LI	* src/Makefile.am (INCLUDES): Add -I../lib, for regex.h.
1225*18fd37a7SXin LI
1226*18fd37a7SXin LI	* configure.ac:
1227*18fd37a7SXin LI	Don't set LIB_CLOCK_GETTIME to 'none required'; set it to
1228*18fd37a7SXin LI	the empty string instead.
1229*18fd37a7SXin LI
1230*18fd37a7SXin LI	* lib/Makefile.am (EXTRA_DIST): Add strtoimax.c, strtol.c.
1231*18fd37a7SXin LI
1232*18fd37a7SXin LI	* Makefile.am (SUBDIRS): Put intl before lib, so that libintl.h exists.
1233*18fd37a7SXin LI
1234*18fd37a7SXin LI	* lib/Makefile.am (noinst_HEADERS): Add unlocked-io.h.
1235*18fd37a7SXin LI
1236*18fd37a7SXin LI	* configure.ac (__EXTENSIONS__): New define, for the unlocked macros.
1237*18fd37a7SXin LI
1238*18fd37a7SXin LI	* README: Add copyright notice.
1239*18fd37a7SXin LI	Remove stuff that doesn't apply any more.
1240*18fd37a7SXin LI
1241*18fd37a7SXin LI	* doc/diff.texi: offsets -> indices for cmp
1242*18fd37a7SXin LI
1243*18fd37a7SXin LI	* src/cmp.c (option_help_msgid): offsets -> indices
1244*18fd37a7SXin LI
1245*18fd37a7SXin LI	* src/diff.c (option_help_msgid):
1246*18fd37a7SXin LI	Don't mention --binary on POSIX hosts.
1247*18fd37a7SXin LI
1248*18fd37a7SXin LI	* src/sdiff.c (STRIP_TRAILING_CR_OPTION): New constant.
1249*18fd37a7SXin LI	(longopts, option_help_msgid, main): Add -E, --ignore-tab-expansion,
1250*18fd37a7SXin LI	--strip-trailing-cr.
1251*18fd37a7SXin LI
1252*18fd37a7SXin LI	* doc/diff.texi: Change direcategory from Utilities to GNU Packages.
1253*18fd37a7SXin LI	Add individual utilities.
1254*18fd37a7SXin LI	Switch to Free Documentation License.
1255*18fd37a7SXin LI	@code -> @command
1256*18fd37a7SXin LI	@samp -> @option
1257*18fd37a7SXin LI	GNU -> @sc{gnu}
1258*18fd37a7SXin LI	Expand tabs to spaces, except when in an example that actually
1259*18fd37a7SXin LI	uses tabs.
1260*18fd37a7SXin LI	Prefer @node with just one arg.
1261*18fd37a7SXin LI	Document -E or --ignore-tab-expansion, --strip-trailing-cr,
1262*18fd37a7SXin LI	--ignore-file-name-case.
1263*18fd37a7SXin LI	Regular expressions are now grep style, not Emacs style.
1264*18fd37a7SXin LI	cmp's -c or --print-chars option is now -b or --print-bytes.
1265*18fd37a7SXin LI	Time stamps now depend on LC_TIME.
1266*18fd37a7SXin LI	-p now implies ^[[:alpha:]$_].
1267*18fd37a7SXin LI	Flags now include ' and 0.
1268*18fd37a7SXin LI	cmp -i is an alias for --ignore-initial
1269*18fd37a7SXin LI	Document --from-file, --to-file.
1270*18fd37a7SXin LI	Document DIFF_OPTIONS.
1271*18fd37a7SXin LI
1272*18fd37a7SXin LI	* configure.ac (AC_CHECK_FUNCS): Add gettimeofday, clock_gettime.
1273*18fd37a7SXin LI	(LIB_CLOCK_GETTIME): New subst.
1274*18fd37a7SXin LI
1275*18fd37a7SXin LI	* src/system.h: Assume C89 or better.
1276*18fd37a7SXin LI	(_GNU_SOURCE): Remove; config.h now defines it.
1277*18fd37a7SXin LI	(alloca): Declare like coreutils does it.
1278*18fd37a7SXin LI	(verify, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, O_RDWR,
1279*18fd37a7SXin LI	S_IRUSR, S_IWUSR): New macros.
1280*18fd37a7SXin LI	(STAT_BLOCKSIZE): Parenthesize definiens.
1281*18fd37a7SXin LI	<inttypes.h>: Include if HAVE_INTTYPES_H.
1282*18fd37a7SXin LI	(CHAR_MAX, INT_MAX): Remove.
1283*18fd37a7SXin LI	(PTRDIFF_MAX, SIZE_MAX): New macros.
1284*18fd37a7SXin LI	(strtoumax): New decl.
1285*18fd37a7SXin LI	Include stddef.h.
1286*18fd37a7SXin LI	(bzero): Remove.
1287*18fd37a7SXin LI	(bindtextdomain, textdomain, N_): New macros.
1288*18fd37a7SXin LI	(ISPRINT, ISSPACE): Remove ifndef wrappers.
1289*18fd37a7SXin LI	(ISUPPER, ISDIGIT): Remove.
1290*18fd37a7SXin LI	(TOLOWER): New macro.
1291*18fd37a7SXin LI	(MIN): Renamed from min; all callers changed.
1292*18fd37a7SXin LI	(MAX): Likewise, from max.
1293*18fd37a7SXin LI	(lin): New type.
1294*18fd37a7SXin LI	(LIN_MAX): New macro.
1295*18fd37a7SXin LI	(file_name_cmp): Renamed from filename_cmp.  All callers changed.
1296*18fd37a7SXin LI	(file_name_lastdirchar): Renamed from file_name_lastdirchar.
1297*18fd37a7SXin LI	All callers changed.
1298*18fd37a7SXin LI	(could_be_mvfs_stat_bug, could_be_nfs_stat_bug,
1299*18fd37a7SXin LI	dev_may_have_duplicate_ino): Remove.
1300*18fd37a7SXin LI	(HAVE_SETMODE, NULL_DEVICE): New macros.
1301*18fd37a7SXin LI	(same_file): Do not check attributes.
1302*18fd37a7SXin LI	(same_file_attributes): New macro.
1303*18fd37a7SXin LI
1304*18fd37a7SXin LI	* src/util.c: Assume C89 or better.
1305*18fd37a7SXin LI	int -> bool for booleans.
1306*18fd37a7SXin LI	int -> lin for line numbers.
1307*18fd37a7SXin LI	int -> size_t for sizes.
1308*18fd37a7SXin LI	Use angle-brackets when including quotesys.h.
1309*18fd37a7SXin LI	Include error.h, regex.h, xalloc.h.
1310*18fd37a7SXin LI	(message5): sizeof -> offsetof
1311*18fd37a7SXin LI	(begin_output): Invoke pr without -f.
1312*18fd37a7SXin LI	(lines_differ): Renamed from line_cmp, and return bool not 3-way int.
1313*18fd37a7SXin LI	All callers changed.
1314*18fd37a7SXin LI	Add support for IGNORE_TAB_EXPANSION.
1315*18fd37a7SXin LI	(change_letter): Now an array rather than a function.  All
1316*18fd37a7SXin LI	callers changed.
1317*18fd37a7SXin LI	(translate_range): Translate line numbers to long, not lin,
1318*18fd37a7SXin LI	for convenience with printf.
1319*18fd37a7SXin LI	(analyze_hunk): Return enum changes instead of a count of
1320*18fd37a7SXin LI	inserts and deletes.  All callers changed.
1321*18fd37a7SXin LI	(zalloc): New function.
1322*18fd37a7SXin LI
1323*18fd37a7SXin LI	* src/side.c: Assume C89 or better.
1324*18fd37a7SXin LI	int -> bool for booleans.
1325*18fd37a7SXin LI	int -> lin for line numbers.
1326*18fd37a7SXin LI
1327*18fd37a7SXin LI	* src/sdiff.c: Assume C89 or better.
1328*18fd37a7SXin LI	int -> bool for booleans.
1329*18fd37a7SXin LI	int -> lin for line numbers.
1330*18fd37a7SXin LI	Use angle-brackets when including getopt.h, quotesys.h.
1331*18fd37a7SXin LI	Include error.h, freesoft.h, stdio.h, xalloc.h.
1332*18fd37a7SXin LI	(copyright_string): Use only most recent year.
1333*18fd37a7SXin LI	(authorship_msgid, option_help_msgid): Wrap in N_().
1334*18fd37a7SXin LI
1335*18fd37a7SXin LI	(tmpname): Now volatile.
1336*18fd37a7SXin LI	(tmpmade): Remove.
1337*18fd37a7SXin LI	(tmp): New var.
1338*18fd37a7SXin LI	(private_tempnam, exists, letters): Remove.
1339*18fd37a7SXin LI	(temporary_file): New function.
1340*18fd37a7SXin LI	(edit): Use it.
1341*18fd37a7SXin LI	(interact): Use strtoumax, not atoi.
1342*18fd37a7SXin LI
1343*18fd37a7SXin LI	* src/normal.c: Assume C89 or better.
1344*18fd37a7SXin LI	int -> lin for line numbers.
1345*18fd37a7SXin LI
1346*18fd37a7SXin LI	* src/io.c: Assume C89 or better.
1347*18fd37a7SXin LI	int -> bool for booleans.
1348*18fd37a7SXin LI	int -> lin for line numbers.
1349*18fd37a7SXin LI	int -> size_t for sizes.
1350*18fd37a7SXin LI	Use angle-brackets when including cmpbuf.h.
1351*18fd37a7SXin LI	Include regex.h, xalloc.h.
1352*18fd37a7SXin LI	(word): Remove; now done in system.h.
1353*18fd37a7SXin LI	(hash_value): New type; use it instead of 'unsigned' for hash values.
1354*18fd37a7SXin LI	(file_block_read): New function.
1355*18fd37a7SXin LI	(sip, slurp): Use it.  Now static.
1356*18fd37a7SXin LI	(sip): Ensure block size is a multiple of word size.  Clear eof flag.
1357*18fd37a7SXin LI	(slurp): Use xalloc_die to report memory exhaustion.
1358*18fd37a7SXin LI	(find_and_hash_each_line): Use TOLOWER instead of _tolower.
1359*18fd37a7SXin LI	Add support for IGNORE_TAB_EXPANSION.
1360*18fd37a7SXin LI	(prepare_text_end): Strip trailing CR if requested.
1361*18fd37a7SXin LI	(find_identical_ends): Prepare the text only once,
1362*18fd37a7SXin LI	if they're duplicates.
1363*18fd37a7SXin LI	Let the compiler take advantage more of the fact that the buffers are
1364*18fd37a7SXin LI	word-aligned.
1365*18fd37a7SXin LI	(primes): Remove.
1366*18fd37a7SXin LI	(prime_offset): New var.
1367*18fd37a7SXin LI	(read_var): Use prime_offset instead of primes.
1368*18fd37a7SXin LI	Use zalloc instead of xmalloc + bzero.
1369*18fd37a7SXin LI
1370*18fd37a7SXin LI	* src/ifdef.c: Assume C89 or better.
1371*18fd37a7SXin LI	int -> lin for line numbers.
1372*18fd37a7SXin LI	(format_group): Use strtoumax to parse line numbers.
1373*18fd37a7SXin LI	(format_group, print_ifdef_lines): Use do_printf_spec to
1374*18fd37a7SXin LI	handle printf specs.
1375*18fd37a7SXin LI	(groups_letter_value): Don't use _tolower; it's locale-dependent.
1376*18fd37a7SXin LI	(do_printf_spec): Renamed from scan_printf_spec; now does the printing.
1377*18fd37a7SXin LI
1378*18fd37a7SXin LI	* src/ed.c: Assume C89 or better.
1379*18fd37a7SXin LI	int -> lin for line numbers (or 'long' when that's more convenient).
1380*18fd37a7SXin LI	(print_ed_hunk): Fix bug when handling double-dot inserts.
1381*18fd37a7SXin LI
1382*18fd37a7SXin LI	* src/dir.c: Assume C89 or better.
1383*18fd37a7SXin LI	int -> bool for booleans.
1384*18fd37a7SXin LI	Include error.h, exclude.h, xalloc.h.
1385*18fd37a7SXin LI
1386*18fd37a7SXin LI	(dir_sort): Return 0 on error, 1 on success.  All callers changed.
1387*18fd37a7SXin LI	compare_names -> compare_names_for_qsort.
1388*18fd37a7SXin LI
1389*18fd37a7SXin LI	(compare_names): Try strcasecmp if ignore_file_name_case.  Then try
1390*18fd37a7SXin LI	strcoll.  Use file_name_cmp only as a last resort.  Warn about
1391*18fd37a7SXin LI	strcasecmp or strcoll failure.
1392*18fd37a7SXin LI	(compare_names_for_qsort): New function.
1393*18fd37a7SXin LI
1394*18fd37a7SXin LI	(diff_dirs): Use compare_names rather than filename_cmp.
1395*18fd37a7SXin LI
1396*18fd37a7SXin LI	* src/diff3.c: Assume C89 or better.
1397*18fd37a7SXin LI	int -> bool for booleans.
1398*18fd37a7SXin LI	int -> lin for line numbers.
1399*18fd37a7SXin LI	Use angle-brackets when including getopt.h, quotesys.h.
1400*18fd37a7SXin LI	Include error.h, freesoft.h, inttostr.h, xalloc.h.
1401*18fd37a7SXin LI	(copyright_string): Use only most recent year.
1402*18fd37a7SXin LI	(authorship_msgid, option_help_msgid): Wrap in N_().
1403*18fd37a7SXin LI
1404*18fd37a7SXin LI	Rename the following variables for consistency with user-visible
1405*18fd37a7SXin LI	option spellings.  All uses changed.
1406*18fd37a7SXin LI	(text): Renamed from always_text.
1407*18fd37a7SXin LI	(initial_tab): Renamed from tab_align_flag.
1408*18fd37a7SXin LI
1409*18fd37a7SXin LI	(horizon_lines): Remove.  Remove all uses.
1410*18fd37a7SXin LI
1411*18fd37a7SXin LI	(main): Invoke bindtextdomain and textdomain after setlocale.
1412*18fd37a7SXin LI	Rename "DIFF" to "DIFF_PROGRAM".
1413*18fd37a7SXin LI
1414*18fd37a7SXin LI	Try to compare file0 to file1, because this is where changes are
1415*18fd37a7SXin LI	expected to come from.  Diffing between these pairs of files is more
1416*18fd37a7SXin LI	likely to avoid phantom changes from file0 to file1.
1417*18fd37a7SXin LI	However, use file2 as the common file if this is a 3-way diff,
1418*18fd37a7SXin LI	for backward compatibility.  Suggested by Karl Tomlinson.
1419*18fd37a7SXin LI
1420*18fd37a7SXin LI	(create_diff3_block): Use xcalloc instead of malloc + bzero.
1421*18fd37a7SXin LI
1422*18fd37a7SXin LI	(INT_STRLEN_BOUND): Remove; now in system.h.
1423*18fd37a7SXin LI
1424*18fd37a7SXin LI	(read_diff): Always use --horizon-lines=100 rather than trying
1425*18fd37a7SXin LI	to guess it.
1426*18fd37a7SXin LI	Do not pass --inhibit-hunk-merge.
1427*18fd37a7SXin LI	Minimum chunk size is 1, not 8KiB.
1428*18fd37a7SXin LI	Use xalloc_die to report memory exhaustion.
1429*18fd37a7SXin LI	(undotlines): Use long for start, not int.
1430*18fd37a7SXin LI
1431*18fd37a7SXin LI	* src/diff.h: Assume C89 or better.
1432*18fd37a7SXin LI	int -> bool for booleans.
1433*18fd37a7SXin LI	int -> lin for line numbers.
1434*18fd37a7SXin LI	Don't include regex.h.
1435*18fd37a7SXin LI	(enum changes): New enum.
1436*18fd37a7SXin LI	(enum line_class): Remove; subsumed by enum changes.
1437*18fd37a7SXin LI	(enum output_style): New constant OUTPUT_UNSPECIFIED.
1438*18fd37a7SXin LI
1439*18fd37a7SXin LI	(ignore_space_change_flag, ignore_all_space_flag): Remove.
1440*18fd37a7SXin LI	(ignore_white_space): New decl, subsuming the above two.  All
1441*18fd37a7SXin LI	uses changed.
1442*18fd37a7SXin LI
1443*18fd37a7SXin LI	Rename the following decls for consistency with user-visible
1444*18fd37a7SXin LI	option spellings.  All uses changed.
1445*18fd37a7SXin LI	(text): Renamed from always_text_flag.
1446*18fd37a7SXin LI	(ignore_blank_lines): Renamed from ignore_blank_lines_flag.
1447*18fd37a7SXin LI	(ignore_case): Renamed from ignore_case_flag.
1448*18fd37a7SXin LI	(brief): Renamed from no_details_flag.
1449*18fd37a7SXin LI	(initial_tab): Renamed from tab_align_flag.
1450*18fd37a7SXin LI	(expand_tabs): Renamed from tab_expand_flag.
1451*18fd37a7SXin LI	(starting_file): Renamed from dir_start_file.
1452*18fd37a7SXin LI	(paginate): Renamed from paginate_flag.
1453*18fd37a7SXin LI	(sdiff_merge_assist): Renamed from sdiff_help_sdiff.
1454*18fd37a7SXin LI	(left_column): Renamed from sdiff_left_only.
1455*18fd37a7SXin LI	(suppress_common_lines): Renamed from sdiff_skip_common_lines.
1456*18fd37a7SXin LI	(speed_large_files): Renamed from heuristic.
1457*18fd37a7SXin LI	(minimal): Renamed from no_discards.
1458*18fd37a7SXin LI
1459*18fd37a7SXin LI	(inhibit_hunk_merge): Remove.
1460*18fd37a7SXin LI
1461*18fd37a7SXin LI	(strip_trailing_cr, excluded, time_format): New decls.
1462*18fd37a7SXin LI
1463*18fd37a7SXin LI	(files_can_be_treated_as_binary): Renamed from ignore_some_changes.
1464*18fd37a7SXin LI
1465*18fd37a7SXin LI	(group_format, line_format): Now char const *[], not char *[].
1466*18fd37a7SXin LI
1467*18fd37a7SXin LI	(struct file_data): Buffer is now word*, not char*, as it's always
1468*18fd37a7SXin LI	aligned and this can help the compiler.  buffered_chars -> buffered
1469*18fd37a7SXin LI	(since it's a byte count, not a char count).  All uses changed.
1470*18fd37a7SXin LI	New member `eof'.
1471*18fd37a7SXin LI
1472*18fd37a7SXin LI	(FILE_BUFFER): New macro.
1473*18fd37a7SXin LI
1474*18fd37a7SXin LI	(excluded_filename, error, free_software_msgid): Remove decls; now in
1475*18fd37a7SXin LI	other .h files.
1476*18fd37a7SXin LI
1477*18fd37a7SXin LI	(sip, slurp): Remove decls.
1478*18fd37a7SXin LI	(file_block_read): New decl.
1479*18fd37a7SXin LI	(change_letter): Now an array, not a function.
1480*18fd37a7SXin LI	(lines_differ): Renamed from line_cmp.
1481*18fd37a7SXin LI	(analyze_hunk): Now returns enum changes rather than two change counts.
1482*18fd37a7SXin LI
1483*18fd37a7SXin LI	* src/Makefile.am (diff_LDADD): New symbol.
1484*18fd37a7SXin LI
1485*18fd37a7SXin LI	* src/diff.c: Assume C89 or better.
1486*18fd37a7SXin LI	int -> bool for booleans.
1487*18fd37a7SXin LI	long -> off_t for line numbers.
1488*18fd37a7SXin LI	Use angle-brackets when including getopt.h, fnmatch.h, quotesys.h.
1489*18fd37a7SXin LI	Include error.h, exclude.h, freesoft.h, hard-locale.h, prepargs.h,
1490*18fd37a7SXin LI	regex.h, signal.h, xalloc.h.
1491*18fd37a7SXin LI	(copyright_string): Use only most recent year.
1492*18fd37a7SXin LI	(authorship_msgid, option_help_msgid): Wrap in N_().
1493*18fd37a7SXin LI
1494*18fd37a7SXin LI	Rename the following variables for consistency with user-visible
1495*18fd37a7SXin LI	option spellings.  All uses changed.
1496*18fd37a7SXin LI	(binary): Renamed from binary_flag.
1497*18fd37a7SXin LI	(new_file): Renamed from entire_new_file_flag.
1498*18fd37a7SXin LI	(unidirectional_new_file): Renamed from unidirectional_new_file_flag.
1499*18fd37a7SXin LI	(report_identical_files): Renamed from print_file_same_flag.
1500*18fd37a7SXin LI
1501*18fd37a7SXin LI	(numeric_arg): Remove.
1502*18fd37a7SXin LI
1503*18fd37a7SXin LI	(exclude, exclude_alloc, exclude_count, excluded_filename, add_exclude,
1504*18fd37a7SXin LI	add_exclude_file):
1505*18fd37a7SXin LI	Remove; now done by exclude.h.
1506*18fd37a7SXin LI
1507*18fd37a7SXin LI	(BINARY_OPTION, FROM_FILE_OPTION, HELP_OPTION, HORIZON_LINES_OPTION,
1508*18fd37a7SXin LI	IGNORE_FILE_NAME_CASE_OPTION, INHIBIT_HUNK_MERGE_OPTION,
1509*18fd37a7SXin LI	LEFT_COLUMN_OPTION, LINE_FORMAT_OPTION, NORMAL_OPTION,
1510*18fd37a7SXin LI	SDIFF_MERGE_ASSIST_OPTION, STRIP_TRAILING_CR_OPTION,
1511*18fd37a7SXin LI	SUPPRESS_COMMON_LINES_OPTION, TO_FILE_OPTION,
1512*18fd37a7SXin LI	UNCHANGED_LINE_FORMAT_OPTION, OLD_LINE_FORMAT_OPTION,
1513*18fd37a7SXin LI	NEW_LINE_FORMAT_OPTION, UNCHANGED_GROUP_FORMAT_OPTION,
1514*18fd37a7SXin LI	OLD_GROUP_FORMAT_OPTION, NEW_GROUP_FORMAT_OPTION,
1515*18fd37a7SXin LI	CHANGED_GROUP_FORMAT_OPTION): New constants.
1516*18fd37a7SXin LI	(longopts, main): Use them.
1517*18fd37a7SXin LI
1518*18fd37a7SXin LI	(longopts, main, option_help_msgid): Add -E, --from-file, --to-file.
1519*18fd37a7SXin LI
1520*18fd37a7SXin LI	(main): Invoke bindtextdomain and textdomain after setlocale.
1521*18fd37a7SXin LI	Use grep syntax, not Emacs, for regular expressions.
1522*18fd37a7SXin LI	Use exclude.h, not our own functions.
1523*18fd37a7SXin LI	Use ISO 8601 time format in hard locales.
1524*18fd37a7SXin LI	Prepend DIFF_OPTIONS.
1525*18fd37a7SXin LI	Don't update ignore_some_changes.
1526*18fd37a7SXin LI	Use strtoumax instead of numeric_arg.
1527*18fd37a7SXin LI	Use specify_value when appropriate.
1528*18fd37a7SXin LI	error -> try_help when appropriate.
1529*18fd37a7SXin LI	-p now means ^[[:alpha:]$_], not ^[_a-zA-Z$].
1530*18fd37a7SXin LI	Ignore --inhibit-hunk-merge.
1531*18fd37a7SXin LI	Prefer changed group formats to unchanged ones.
1532*18fd37a7SXin LI	Remove now-unnecessary casts.
1533*18fd37a7SXin LI	Set files_can_be_treated_as_binary.
1534*18fd37a7SXin LI
1535*18fd37a7SXin LI	(specify_value): Renamed from specify_format.  All uses changed.
1536*18fd37a7SXin LI
1537*18fd37a7SXin LI	(specify_style): Default is now unspecified, not normal.  All
1538*18fd37a7SXin LI	uses changed.
1539*18fd37a7SXin LI
1540*18fd37a7SXin LI	(set_mtime_to_now): New function.
1541*18fd37a7SXin LI	(compare_files): Use it.  Use memset, not bzero.
1542*18fd37a7SXin LI	Set stdin mtime to current time even when stdin is not a regular file.
1543*18fd37a7SXin LI	Check for same file attributes, as well as for same file.
1544*18fd37a7SXin LI	Use files_can_be_treated_as_binary.
1545*18fd37a7SXin LI	"write failed" -> "standard output on output failure.
1546*18fd37a7SXin LI
1547*18fd37a7SXin LI	* src/context.c: Assume C89 or better.
1548*18fd37a7SXin LI	int -> lin for line numbers.
1549*18fd37a7SXin LI	Include inttostr.h, regex.h.
1550*18fd37a7SXin LI	(TIMESPEC_NS): New macro.
1551*18fd37a7SXin LI	(nstrftime): New decl.
1552*18fd37a7SXin LI	(print_context_label): Use nstrftime and time_format to format times.
1553*18fd37a7SXin LI	Print numeric time stamp value if localtime fails.
1554*18fd37a7SXin LI	(print_context_function): New function.
1555*18fd37a7SXin LI	(pr_context_hunk, pr_unidiff_hunk): Use it.
1556*18fd37a7SXin LI	(find_function): Use size_t for sizes, not int.
1557*18fd37a7SXin LI
1558*18fd37a7SXin LI	* src/cmp.c: Assume C89 or better.
1559*18fd37a7SXin LI	int -> bool for booleans.
1560*18fd37a7SXin LI	long -> off_t for line numbers.
1561*18fd37a7SXin LI	Use angle-brackets when including cmpbuf.h, getopt.h.
1562*18fd37a7SXin LI	Include error.h, freesoft.h, inttostr.h, xalloc.h.
1563*18fd37a7SXin LI	(copyright_string): Use only most recent year.
1564*18fd37a7SXin LI	(authorship_msgid): Wrap in N_().
1565*18fd37a7SXin LI	(buffer): Now word*, not char*.  All uses changed.
1566*18fd37a7SXin LI	(word): Remove macro; now in system.h.
1567*18fd37a7SXin LI	(long_options, option_help_msgid, main): -c --print-chars ->
1568*18fd37a7SXin LI	-b --print-bytes
1569*18fd37a7SXin LI	(check_stdout): "write failed" -> "standard output"
1570*18fd37a7SXin LI	(option_help_msgid): Wrap in N_().
1571*18fd37a7SXin LI	(main): Invoke bindtextdomain and textdomain after setlocale.
1572*18fd37a7SXin LI	Use strtoumax instead of doing the work ourselves.
1573*18fd37a7SXin LI	Check for same_file_attributes as well as same_file.
1574*18fd37a7SXin LI	(cmp): Use ssize_t for read returns, not size_t.
1575*18fd37a7SXin LI	Do not assume that size_t is not narrower than int.
1576*18fd37a7SXin LI	Do not assume that line numbers fit in 'long'.
1577*18fd37a7SXin LI	(block_compare_and_count, block_compare):
1578*18fd37a7SXin LI	Compiler now checks that buffers are word-aligned.
1579*18fd37a7SXin LI	(block_compare_and_count): Count sizes with size_t, not long.
1580*18fd37a7SXin LI	(sprintc): byte arg is unsigned char, not unsigned.
1581*18fd37a7SXin LI
1582*18fd37a7SXin LI	* src/analyze.c: Assume C89 or better.
1583*18fd37a7SXin LI	int -> lin for line numbers.
1584*18fd37a7SXin LI	int -> bool for booleans.
1585*18fd37a7SXin LI	unsigned int -> size_t for sizes.
1586*18fd37a7SXin LI	Use angle-brackets when including cmpbuf.h.
1587*18fd37a7SXin LI	Include error.h, regex.h, xalloc.h.
1588*18fd37a7SXin LI	(discard_confusing_lines, diff_2_files): Use zalloc rather
1589*18fd37a7SXin LI	than xalloc+bzero.
1590*18fd37a7SXin LI	(discard_confusing_lines): unsigned int -> lin for values that
1591*18fd37a7SXin LI	are really line numbers.
1592*18fd37a7SXin LI	(shift_boundaries): Do not inhibit hunk merges.
1593*18fd37a7SXin LI	(build_reverse_script, build_script, diff_2_files): Use |, not ||.
1594*18fd37a7SXin LI	(diff_2_files): no_details_flag & ~ignore_some_changes ->
1595*18fd37a7SXin LI	files_can_be_treated_as_binary.  Esure that buffer size is a multiple
1596*18fd37a7SXin LI	of sizeof (word).  Use file_block_read to read buffers.
1597*18fd37a7SXin LI	(diff_2_files): Abort if output style is not one of the
1598*18fd37a7SXin LI	expected styles.
1599*18fd37a7SXin LI
1600*18fd37a7SXin LI2001-11-23  Paul Eggert  <eggert@twinsun.com>
1601*18fd37a7SXin LI
1602*18fd37a7SXin LI	* src/Makefile.am, m4/vararrays.m4: New file.
1603*18fd37a7SXin LI
1604*18fd37a7SXin LI	* m4/prereq.m4 (jm_PREREQ_READUTMP):
1605*18fd37a7SXin LI	Remove, as it gives autoheader the willies.
1606*18fd37a7SXin LI
1607*18fd37a7SXin LI	* m4/README, lib/prepargs.h, lib/prepargs.c, lib/offtostr.c,
1608*18fd37a7SXin LI	lib/umaxtostr.c, lib/inttostr.c, lib/inttostr.h,
1609*18fd37a7SXin LI	lib/imaxtostr.c, lib/freesoft.h: New files.
1610*18fd37a7SXin LI
1611*18fd37a7SXin LI	* lib/freesoft.c: Include config.h, freesoft.h rather than diff.h.
1612*18fd37a7SXin LI	(free_software_msgid): Wrap contents in N_.
1613*18fd37a7SXin LI
1614*18fd37a7SXin LI	* lib/cmpbuf.h: Use prototypes instead of old-style functions.
1615*18fd37a7SXin LI
1616*18fd37a7SXin LI	* lib/cmpbuf.c:
1617*18fd37a7SXin LI	Don't include system.h; instead, include config.h, unistd.h.
1618*18fd37a7SXin LI	Use prototypes instead of old-style functions.
1619*18fd37a7SXin LI	(block_read): Don't assume that int is no wider than size_t.
1620*18fd37a7SXin LI
1621*18fd37a7SXin LI	* lib/Makefile.am, po/POTFILES.in: New file.
1622*18fd37a7SXin LI
1623*18fd37a7SXin LI2001-11-22  Paul Eggert  <eggert@twinsun.com>
1624*18fd37a7SXin LI
1625*18fd37a7SXin LI	* pc/config.h:
1626*18fd37a7SXin LI	Define filename_cmp as an object-like macro, not as a function-like
1627*18fd37a7SXin LI	macro.
1628*18fd37a7SXin LI
1629*18fd37a7SXin LI	* exgettext: Always operate in the C locale.
1630*18fd37a7SXin LI	Set AWK using a method that works even with broken shells.
1631*18fd37a7SXin LI
1632*18fd37a7SXin LI	* doc/Makefile.am: New file.
1633*18fd37a7SXin LI
1634*18fd37a7SXin LI	* configure.ac (AC_INIT):
1635*18fd37a7SXin LI	Use src/diff.c, not diff.h, as the source files got removed.
1636*18fd37a7SXin LI	(AM_CONFIG_HEADER): Switch from AC_CONFIG_HEADER.
1637*18fd37a7SXin LI	(AC_ARG_PROGRAM, AC_MINIX): Remove.
1638*18fd37a7SXin LI
1639*18fd37a7SXin LI	(AC_PREREQ, AM_INIT_AUTOMAKE, ALL_LINGUAS, AC_PROG_AWK,
1640*18fd37a7SXin LI	AM_PROG_CC_STDC, AC_PROG_RANLIB, AC_C_INLINE, AC_C_VARARRAYS,
1641*18fd37a7SXin LI	DEFAULT_DIFF_PROGRAM, DEFAULT_EDITOR_PROGRAM,
1642*18fd37a7SXin LI	AC_STRUCT_ST_MTIM_NSEC): Add.
1643*18fd37a7SXin LI
1644*18fd37a7SXin LI	(PR_PROGRAM): AC_DEFINE.
1645*18fd37a7SXin LI
1646*18fd37a7SXin LI	(AC_SYS_LARGEFILE): Use instead of our homebrew version.
1647*18fd37a7SXin LI
1648*18fd37a7SXin LI	(_GNU_SOURCE): Define if not defined.
1649*18fd37a7SXin LI
1650*18fd37a7SXin LI	(AC_CHECK_HEADERS): Add stdbool.h, unistd.h.
1651*18fd37a7SXin LI	(AC_CHECK_TYPES): Add ptrdiff_t, uintmax_t.
1652*18fd37a7SXin LI	(AM_GNU_GETTEXT, XGETTEXT): Add.
1653*18fd37a7SXin LI
1654*18fd37a7SXin LI	(WITH_MVFS_STAT_BUG, WITH_NFS_STAT_BUG): Remove.
1655*18fd37a7SXin LI	(HAVE_MEMCHR): Remove.
1656*18fd37a7SXin LI	(AC_CHECK_FUNCS): Add diraccess.
1657*18fd37a7SXin LI	(AC_REPLACE_FUNCS): Add memchr, waitpid.
1658*18fd37a7SXin LI	(jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_GNU_STRFTIME, jm_FUNC_MALLOC,
1659*18fd37a7SXin LI	 jm_FUNC_REALLOC, jm_PREREQ_ERROR, jm_PREREQ_QUOTEARG, jm_PREREQ_REGEX,
1660*18fd37a7SXin LI	 jm_PREREQ_TEMPNAME, jm_AC_PREREQ_XSTRTOUMAX, AC_FUNC_FNMATCH): Add.
1661*18fd37a7SXin LI	(fnmatch.h, regex.h): Do not create these files unless we're using
1662*18fd37a7SXin LI	our own fnmatch and regex.
1663*18fd37a7SXin LI
1664*18fd37a7SXin LI	(AC_OUTPUT): Add doc/Makefile, intl/Makefile, lib/Makefile,
1665*18fd37a7SXin LI	lib/posix/Makefile, m4/Makefile, po/Makefile.in, src/Makefile.
1666*18fd37a7SXin LI
1667*18fd37a7SXin LI	* Makefile.am: New file.
1668*18fd37a7SXin LI
1669*18fd37a7SXin LI	* po/en_GB.po: Don't translate "program" to "programme".
1670*18fd37a7SXin LI
1671*18fd37a7SXin LI2001-11-20  Paul Eggert  <eggert@twinsun.com>
1672*18fd37a7SXin LI
1673*18fd37a7SXin LI	* m4/prereq.m4: New file.
1674*18fd37a7SXin LI
1675*18fd37a7SXin LI2001-03-16  Paul Eggert  <eggert@twinsun.com>
1676*18fd37a7SXin LI
1677*18fd37a7SXin LI	* lib/tempname.c (uint64_t):
1678*18fd37a7SXin LI	Define if not defined, and if UINT64_MAX is not defined.
1679*18fd37a7SXin LI
1680*18fd37a7SXin LI2001-02-26  Paul Eggert  <eggert@twinsun.com>
1681*18fd37a7SXin LI
1682*18fd37a7SXin LI	* lib/tempname.c: glibc 1.32
1683*18fd37a7SXin LI
1684*18fd37a7SXin LI2001-02-17  Paul Eggert  <eggert@twinsun.com>
1685*18fd37a7SXin LI
1686*18fd37a7SXin LI	* m4/Makefile.am.in: GNU fileutils 4.1
1687*18fd37a7SXin LI
1688*18fd37a7SXin LI2001-01-09  Paul Eggert  <eggert@twinsun.com>
1689*18fd37a7SXin LI
1690*18fd37a7SXin LI	* lib/tempname.c (struct_stat64): New macro.
1691*18fd37a7SXin LI	(direxists, __gen_tempname): Use it.  This avoids a portability problem
1692*18fd37a7SXin LI	with Solaris 8.
1693*18fd37a7SXin LI
1694*18fd37a7SXin LI	* lib/tempname.c (<config.h>): Include if HAVE_CONFIG_H.
1695*18fd37a7SXin LI	(<stddef.h>, <stdint.h>, <string.h>):
1696*18fd37a7SXin LI	Include only if STDC_HEADERS || _LIBC.
1697*18fd37a7SXin LI	(<fcntl.h>): Include only if HAVE_FCNTL_H || _LIBC.
1698*18fd37a7SXin LI	(<unistd.h>): Include only if HAVE_UNISTD_H || _LIBC.
1699*18fd37a7SXin LI	(<sys/time.h>): Include only if HAVE_SYS_TIME_H || _LIBC.
1700*18fd37a7SXin LI	(__set_errno): Define this macro if <errno.h> doesn't.
1701*18fd37a7SXin LI	(P_tmpdir, TMP_MAX, __GT_FILE, __GT_BIGFILE, __GT_DIR, __GT_NOCREATE):
1702*18fd37a7SXin LI	Define these macros if <stdio.h> doesn't.
1703*18fd37a7SXin LI	(S_ISDIR, S_IRUSR, S_IWUSR, S_IXUSR):
1704*18fd37a7SXin LI	Define these macros if <sys/stat.h>
1705*18fd37a7SXin LI	doesn't.  Ignore <sys/stat.h> S_ISDIR if STAT_MACROS_BROKEN.
1706*18fd37a7SXin LI	(stat64, __getpid, __gettimeofday, __mkdir, __open, __open64, lxstat64,
1707*18fd37a7SXin LI	__xstat64): Define if not _LIBC.
1708*18fd37a7SXin LI	(__secure_getenv): Define if ! (HAVE___SECURE_GETENV || _LIBC).
1709*18fd37a7SXin LI	(__gen_tempname): Invoke gettimeofday only if HAVE_GETTIMEOFDAY
1710*18fd37a7SXin LI	|| _LIBC; otherwise, fall back on plain "time".
1711*18fd37a7SXin LI	Use macros like S_IRUSR | S_IWUSR rather than octal values like 0600.
1712*18fd37a7SXin LI
1713*18fd37a7SXin LI	* lib/mkstemp.c (__GT_FILE): Define to zero if not defined.
1714*18fd37a7SXin LI
1715*18fd37a7SXin LI2000-10-25  Paul Eggert  <eggert@twinsun.com>
1716*18fd37a7SXin LI
1717*18fd37a7SXin LI	* lib/hard-locale.c: New file.
1718*18fd37a7SXin LI
1719*18fd37a7SXin LI2000-02-05  Paul Eggert  <eggert@twinsun.com>
1720*18fd37a7SXin LI
1721*18fd37a7SXin LI	* exgettext: From GCC repository
1722*18fd37a7SXin LI
1723*18fd37a7SXin LI1999-07-06  Paul Eggert  <eggert@twinsun.com>
1724*18fd37a7SXin LI
1725*18fd37a7SXin LI	* lib/mkstemp.c: glibc 2.2
1726*18fd37a7SXin LI
1727*18fd37a7SXin LI1998-12-11  Paul Eggert  <eggert@twinsun.com>
1728*18fd37a7SXin LI
1729*18fd37a7SXin LI	* src/sdiff.c (lf_snarf):
1730*18fd37a7SXin LI	Fix bug when help line wrapped around the input buffer.
1731*18fd37a7SXin LI
1732*18fd37a7SXin LI1998-09-15  Paul Eggert  <eggert@twinsun.com>
1733*18fd37a7SXin LI
1734*18fd37a7SXin LI	* diff.texi: Add @dircategory and @direntry.
1735*18fd37a7SXin LI
1736*18fd37a7SXin LI1998-09-14  Paul Eggert  <eggert@twinsun.com>
1737*18fd37a7SXin LI
1738*18fd37a7SXin LI	* Makefile.in (VERSION): Version 2.7.2.
1739*18fd37a7SXin LI	(DEFAULT_DIFF_PROGRAM): Renamed from DIFF_PROGRAM.
1740*18fd37a7SXin LI	(PR_PROGRAM): All `configure' to define it.
1741*18fd37a7SXin LI	(srcs): Add $(diffutils_srcs), freesoft.c, quotearg.c instead of
1742*18fd37a7SXin LI	quote.c, quotearg.h.
1743*18fd37a7SXin LI	(distfiles): Add acconfig.h, message/*.
1744*18fd37a7SXin LI	(all): Depend on $(destfiles), not info.
1745*18fd37a7SXin LI	(version.c): Parenthesize `GNU diffutils'.
1746*18fd37a7SXin LI	(common_o): Add freesoft.o
1747*18fd37a7SXin LI	(diff_o): quote.o -> quotearg.o
1748*18fd37a7SXin LI	(diff3_o, sdiff_o): Likewise.
1749*18fd37a7SXin LI	(diff.dvi): Depend on version.texi.
1750*18fd37a7SXin LI	(diff.o diff3.o quotearg.o sdiff.o util.o):
1751*18fd37a7SXin LI	New dependency on quotearg.h
1752*18fd37a7SXin LI	(diff3.o): DIFF_PROGRAM -> DEFAULT_DIFF_PROGRAM.
1753*18fd37a7SXin LI	(sdiff.o): Likewise.
1754*18fd37a7SXin LI	(messages.po): Remove.
1755*18fd37a7SXin LI	(message/msgid.po, message/template.po): New rules.
1756*18fd37a7SXin LI	(maintainer-clean): Renamed from realclean.
1757*18fd37a7SXin LI	(install): Install from source directory, if applicable.
1758*18fd37a7SXin LI	Invoke install-info if needed.
1759*18fd37a7SXin LI	(install-strip): New rule.
1760*18fd37a7SXin LI	(check): Set DIFF.
1761*18fd37a7SXin LI	(stamp-h.in): Don't put the date into the timestamp.
1762*18fd37a7SXin LI	(D_dirs): Add $D/message.
1763*18fd37a7SXin LI	($D.tar.gz): Compress with gzip -9.
1764*18fd37a7SXin LI	Don't use ln to create distribution; it doesn't work with symlinks.
1765*18fd37a7SXin LI	(srcs, distfiles, diff_o, diff3_o, sdiff_o): Rename quotearg.c to
1766*18fd37a7SXin LI	quotesys.c and quotearg.h to quotesys.h.
1767*18fd37a7SXin LI
1768*18fd37a7SXin LI	* configure.in (AC_PATH_PROG): Add PR_PROGRAM.
1769*18fd37a7SXin LI	If available, prefer support for large files unless the user specified
1770*18fd37a7SXin LI	one of the CPPFLAGS, LDFLAGS, or LIBS variables.
1771*18fd37a7SXin LI	(AC_STRUCT_ST_RDEV): Add.
1772*18fd37a7SXin LI	(HAVE_ST_FSTYPE_STRING): Add.
1773*18fd37a7SXin LI	(--with-mvfs-stat-bug, --with-nfs-stat-bug): New options.
1774*18fd37a7SXin LI	(HAVE_MEMCHR): New macro.
1775*18fd37a7SXin LI	(AC_CHECK_FUNCS): Add sicprocmask.
1776*18fd37a7SXin LI
1777*18fd37a7SXin LI	* diff.h (XTERN): Renamed from EXTERN.
1778*18fd37a7SXin LI	(struct filedata): Remove dir_p arg.
1779*18fd37a7SXin LI	(struct comparison): New type.
1780*18fd37a7SXin LI	(diff_2_files, diff_dirs)" Ise ot/
1781*18fd37a7SXin LI	(error): Add printf attribute if applicable.
1782*18fd37a7SXin LI	(free_software_msgid): New decl.
1783*18fd37a7SXin LI	(pr_program): New decl.
1784*18fd37a7SXin LI	(fatal): Add noreturn attribute.
1785*18fd37a7SXin LI	(pfatal_with_name): Likewise.
1786*18fd37a7SXin LI
1787*18fd37a7SXin LI	* system.h (__attribute__): New macro.
1788*18fd37a7SXin LI	(getenv): Don't declare if HAVE_STDLIB_H.
1789*18fd37a7SXin LI	(CHAR_MAX): New macro.
1790*18fd37a7SXin LI	(<locale.h>): New include.
1791*18fd37a7SXin LI	(<locale.h>): Include before <libintl.h>.
1792*18fd37a7SXin LI	(could_be_mvfs_stat_bug, could_be_nfs_stat_bug,
1793*18fd37a7SXin LI	dev_may_have_duplicate_ino, same_special_file): New macros.
1794*18fd37a7SXin LI	(same_file): Use them.
1795*18fd37a7SXin LI
1796*18fd37a7SXin LI	* cmp.c (authorship_msgid): New var.
1797*18fd37a7SXin LI	(free_software_msgid): New decl.
1798*18fd37a7SXin LI	(error): Now has printf attribute.
1799*18fd37a7SXin LI	(try_help): Likewise.
1800*18fd37a7SXin LI	(long_options): Don't assume ASCII.
1801*18fd37a7SXin LI	(try_help): Now accepts operand arg.
1802*18fd37a7SXin LI	(main): Check for -1, not EOF, when calling getopt_long.
1803*18fd37a7SXin LI	Report --ignore-initial value when complaining about it.
1804*18fd37a7SXin LI	Output copyright and free software info with -v.
1805*18fd37a7SXin LI	Don't assume ASCII.
1806*18fd37a7SXin LI	Report last operand when one is missing.
1807*18fd37a7SXin LI	Report text of extra operand.
1808*18fd37a7SXin LI	Move block_read into cmpbuf.c.
1809*18fd37a7SXin LI
1810*18fd37a7SXin LI	* diff.c (authorship_msgid): New var.
1811*18fd37a7SXin LI	(quotesys.h): Include.
1812*18fd37a7SXin LI	(ck_atoi): Remove.
1813*18fd37a7SXin LI	(function_regexp_list, ignore_regexp_list): Now static.
1814*18fd37a7SXin LI	(binary_flag): Renamed from binary_I_O.
1815*18fd37a7SXin LI	(entire_new_file_flag, unidirectional_new_file_flag,
1816*18fd37a7SXin LI	print_file_same_flag): Now static.
1817*18fd37a7SXin LI	(numeric_arg): Renamed from ck_atoi.
1818*18fd37a7SXin LI	New argument specifying the argument type.
1819*18fd37a7SXin LI	(longopts, main): Don't assume ASCII.
1820*18fd37a7SXin LI	(longopts): Remove old aliases --file-label, --entire-new-file,
1821*18fd37a7SXin LI	--ascii, --print.
1822*18fd37a7SXin LI	(main): Check for -1, not EOF, when calling getopt_long.
1823*18fd37a7SXin LI	Use numeric_arg to report errors.
1824*18fd37a7SXin LI	Report error if -l specified but pagination is not supported.
1825*18fd37a7SXin LI	Report error if -S is specified twice with conflicting values.
1826*18fd37a7SXin LI	Have --version conform to the new GNU standards.
1827*18fd37a7SXin LI	Add new --from-file, --to-file, --inhibit-hun,-merge options.
1828*18fd37a7SXin LI	Make the horizon at least as large as the context.
1829*18fd37a7SXin LI	Add casts to pacify gcc -Wall.
1830*18fd37a7SXin LI	(try_help): Add operand arg.
1831*18fd37a7SXin LI	(option_help_msgid): Doc fix to match above.
1832*18fd37a7SXin LI	(usage): Indent option_help_msgid.
1833*18fd37a7SXin LI	(compare_files): Now takes struct comparison
1834*18fd37a7SXin LI	instead of two directory names and a depth.
1835*18fd37a7SXin LI	(NONEXISTENT, UNOPENED, ERRNO_ENCODE, ERRNO_DECODE):
1836*18fd37a7SXin LI	New macros.
1837*18fd37a7SXin LI	(DIR_P): New macro.
1838*18fd37a7SXin LI	Report error if fflush does.
1839*18fd37a7SXin LI
1840*18fd37a7SXin LI	* cmpbuf.c (block_read): Moved here from cmp.c.
1841*18fd37a7SXin LI
1842*18fd37a7SXin LI	* cmpbuf.h (block_read): New decl.
1843*18fd37a7SXin LI
1844*18fd37a7SXin LI	* io.c (cmpbuf.h): Include.
1845*18fd37a7SXin LI	(slurp): Check for arithmetic overflow when computing buffer size.
1846*18fd37a7SXin LI
1847*18fd37a7SXin LI	* dir.c (diff_dirs): Check for recursive directory loop.
1848*18fd37a7SXin LI	Arg is now struct comparison const *.
1849*18fd37a7SXin LI	(dir_loop): New function
1850*18fd37a7SXin LI
1851*18fd37a7SXin LI	* analyze.c (no_discards): Remove.
1852*18fd37a7SXin LI	(inhibit): Remove.
1853*18fd37a7SXin LI	(shift_boundaries): Don't inhibit.  If inhibit_hunk_merge is nonzero,
1854*18fd37a7SXin LI	don't merge hunks.
1855*18fd37a7SXin LI	(briefly_report): Now returns 2 if trouble, CHANGES otherwise.
1856*18fd37a7SXin LI	(diff_2_files): Now takes struct comparison.  If briefly_report reports
1857*18fd37a7SXin LI	trouble, pass it on to caller.
1858*18fd37a7SXin LI
1859*18fd37a7SXin LI	* side.c (print_half_line): Add brackets to pacify GCC -Wall.
1860*18fd37a7SXin LI
1861*18fd37a7SXin LI	* sdiff.c (quotesys.h): Include.
1862*18fd37a7SXin LI	(DIFF_PROGRAM, DEFAULT_EDITOR_PROGRAM): Remove.
1863*18fd37a7SXin LI	(free_software_msgid, editor_program, not_found): New vars.
1864*18fd37a7SXin LI	(diffbin, edbin): Remove.
1865*18fd37a7SXin LI	(editor_program): Renamed from edbin.
1866*18fd37a7SXin LI	(edit, interact): Now take extra string arg.
1867*18fd37a7SXin LI	(exiterr, fatal, perror_fatal, try_help): Add noreturn attribute.
1868*18fd37a7SXin LI	(sigset_t, sigemptyset, sigmask, sigaddset, SIG_BLOCK, SIG_SETMASK):
1869*18fd37a7SXin LI	(sigprocmask): New macros, if !HAVE_SIGPROCMASK.
1870*18fd37a7SXin LI	(error): Now has printf attribute.
1871*18fd37a7SXin LI	(longopts, main): Don't assume ASCII.
1872*18fd37a7SXin LI	(try_help): New operand arg.
1873*18fd37a7SXin LI	(usage): Conform to new GNU standards.
1874*18fd37a7SXin LI	(main): Set static vars for editor and diff program.
1875*18fd37a7SXin LI	Compare getopt_long result to -1, not EOF.
1876*18fd37a7SXin LI	-v conforms to new GNU standard.
1877*18fd37a7SXin LI	Complain better about extra and missing operands.
1878*18fd37a7SXin LI	If HAVE_VFORK, block SIGINT and SIGPIPE in the parent, since when
1879*18fd37a7SXin LI	the child munges its handlers it may somp on the parent.
1880*18fd37a7SXin LI	Pass rname to intract.
1881*18fd37a7SXin LI	Translate not-found message before forking.
1882*18fd37a7SXin LI	(give_help): Just output it all at once.
1883*18fd37a7SXin LI	(edit): New args lname, lline, rname, rline.
1884*18fd37a7SXin LI	(edit): New command 'd'.
1885*18fd37a7SXin LI	(interact): New args lname, rname.
1886*18fd37a7SXin LI
1887*18fd37a7SXin LI	* util.c (quotesys.h): Include.
1888*18fd37a7SXin LI	(PR_PROGRAM): New macro.
1889*18fd37a7SXin LI	(pfatal_with_name): Abort if error returns.
1890*18fd37a7SXin LI	(fatal): Likewise.
1891*18fd37a7SXin LI	(print_message_queue): Free message chain after printing.
1892*18fd37a7SXin LI	(currently_recursive): Renamed from current_depth, and now a boolean.
1893*18fd37a7SXin LI	(begin_output): Report error if fflush does.
1894*18fd37a7SXin LI	Avoid stdio and gettext in child.
1895*18fd37a7SXin LI
1896*18fd37a7SXin LI	* diff3.c (quotesys.h): Include.
1897*18fd37a7SXin LI	(free_software_msgid): New decl.
1898*18fd37a7SXin LI	(RANGE_START, RANGE_END): Renamed from START and END.
1899*18fd37a7SXin LI	(fatal, perror_with_exit, try_help): Add noreturn attribute.
1900*18fd37a7SXin LI	(error): Add printf attribute.
1901*18fd37a7SXin LI	(diff_program): Now a ptr, not an array.
1902*18fd37a7SXin LI	Initialize to DEFAULT_DIFF_PROGRAM instead of DIFF_PROGRAM.
1903*18fd37a7SXin LI	(longopts, main): Don't assume ASCII.
1904*18fd37a7SXin LI	(main): Use DIFF environment var to specify name of diff program.
1905*18fd37a7SXin LI	Compare getopt_long result to -1, not EOF.
1906*18fd37a7SXin LI	-v now reports version according to new GNU standard.
1907*18fd37a7SXin LI	Report spelling of extra operand, or last operand before missing one.
1908*18fd37a7SXin LI	(try_help): Now takes operand arg.
1909*18fd37a7SXin LI	(option_help_ms): Fix typo: missing comma.
1910*18fd37a7SXin LI	(usage): Update as per current GNU standards.
1911*18fd37a7SXin LI	(environ): Remove decl.
1912*18fd37a7SXin LI	(read_diff): Invoke diff with --inhibit-hunk-merge.
1913*18fd37a7SXin LI	Translate `not found' message before forking.
1914*18fd37a7SXin LI	Quote name of diff program.
1915*18fd37a7SXin LI	Pass horizon lines.
1916*18fd37a7SXin LI	`memory exhausted' -> `Memory exhausted'
1917*18fd37a7SXin LI
1918*18fd37a7SXin LI	* pc/makefile (%.exe): Remove.
1919*18fd37a7SXin LI	(pc-clean): Remove *.exe
1920*18fd37a7SXin LI	* pc/makefile.sed (DEFAULT_DIFF_PROGRAM): Renamed from DIFF_PROGRAM.
1921*18fd37a7SXin LI	When editing mkinstalldirs rule, look for exec_prefix and prefix.
1922*18fd37a7SXin LI	Add .exe when installing files.
1923*18fd37a7SXin LI	* pc/emx/config.h (same_file): Add.
1924*18fd37a7SXin LI	* pc/config.h (same_file): Remove.
1925*18fd37a7SXin LI	* pc/djgpp/config.h: Adjust to latest patch from eliz.
1926*18fd37a7SXin LI	* pc/djgpp/makefile.sed: Don't alter PROGRAMS.
1927*18fd37a7SXin LI	* pc/pc.c: Update FSF address.
1928*18fd37a7SXin LI	(quote_system_arg): Renamed from system_quote_arg.
1929*18fd37a7SXin LI
1930*18fd37a7SXin LI	* README: Add --with-mvfs-stat-bug, --with-nfs-stat-bug.
1931*18fd37a7SXin LI
1932*18fd37a7SXin LI	* getmsgids: Add copyright date and update FSF address.
1933*18fd37a7SXin LI
1934*18fd37a7SXin LI	* diff.texi: Document recent changes.
1935*18fd37a7SXin LI	The patch doc still corresponds to patch 2.2, unfortunately.
1936*18fd37a7SXin LI	Update GNU bug reporting address.  Omit Larry Wall's address;
1937*18fd37a7SXin LI	it's obsolete and he's busy with perl.
1938*18fd37a7SXin LI
1939*18fd37a7SXin LI	* context.c: Fix spacing.
1940*18fd37a7SXin LI
1941*18fd37a7SXin LI	* NEWS: Mention --from-file=FILE, --to-file=FILE, ed.
1942*18fd37a7SXin LI
1943*18fd37a7SXin LI	* acconfig.h, freesoft.c, message/de.po, message/en_UK.po,
1944*18fd37a7SXin LI	message/es.po, message/fr.po, message/pl.po, message/sv.po:
1945*18fd37a7SXin LI	New files.
1946*18fd37a7SXin LI
1947*18fd37a7SXin LI	* ed.c: Remove `#if 0'ed code.
1948*18fd37a7SXin LI
1949*18fd37a7SXin LI	* normal.c, waitpid.c: Update FSF address.
1950*18fd37a7SXin LI
1951*18fd37a7SXin LI1998-03-15  Paul Eggert  <eggert@twinsun.com>
1952*18fd37a7SXin LI
1953*18fd37a7SXin LI	* quotesys.c: Renamed from quotearg.c.
1954*18fd37a7SXin LI
1955*18fd37a7SXin LI	* quotesys.h: Renamed from quotearg.h
1956*18fd37a7SXin LI	(__QUOTESYS_P): Renamed from __QUOTEARG_P.
1957*18fd37a7SXin LI
1958*18fd37a7SXin LI1997-05-05  Paul Eggert  <eggert@twinsun.com>
1959*18fd37a7SXin LI
1960*18fd37a7SXin LI	* quotesys.c, quotesys.h: New file.
1961*18fd37a7SXin LI
1962*18fd37a7SXin LIMon Nov 14 05:10:56 1994  Paul Eggert  <eggert@twinsun.com>
1963*18fd37a7SXin LI
1964*18fd37a7SXin LI	Add internationalization support.
1965*18fd37a7SXin LI	Several messages have been changed slightly,
1966*18fd37a7SXin LI	to make them more consistent and easier to translate.
1967*18fd37a7SXin LI	All strings that are messages are passed through gettext once before
1968*18fd37a7SXin LI	being used, so that they can be localized.
1969*18fd37a7SXin LI	Each function and macro whose first parameter is a gettext msgid
1970*18fd37a7SXin LI	has had its first parameter's name changed so it ends in `msgid'.
1971*18fd37a7SXin LI	All arrays of msgids have had their names changed to end in `msgid'.
1972*18fd37a7SXin LI	`getmsgids' uses this to determine which strings are msgids.
1973*18fd37a7SXin LI
1974*18fd37a7SXin LI	* pc/COPYING, pc/INSTALL, pc/config.h,
1975*18fd37a7SXin LI	pc/djgpp/config.h, pc/djgpp/makefile.sed,
1976*18fd37a7SXin LI	pc/emx/config.h, pc/emx/diff.def, pc/emx/gnuregex.def,
1977*18fd37a7SXin LI	pc/emx/makefile.sed,
1978*18fd37a7SXin LI	pc/makefile, pc/makefile.sed, pc/pc.c: New files, for PC support.
1979*18fd37a7SXin LI
1980*18fd37a7SXin LI	* getmsgids: New file.
1981*18fd37a7SXin LI
1982*18fd37a7SXin LI	* Makefile.in (PACKAGE, VERSION, diffutils_srcs, D): New vars.
1983*18fd37a7SXin LI	(version.c, version.texi, messages.po): New files.
1984*18fd37a7SXin LI	messages.po is built automatically from source files and `getmsgids'.
1985*18fd37a7SXin LI	(distfiles): Add them, pc/*, and getmsgids.
1986*18fd37a7SXin LI	(diff.info): Now depends on version.texi.
1987*18fd37a7SXin LI	(realclean): Clean messages.po, version.*.
1988*18fd37a7SXin LI	(dist): Just build $D.tar.gz.
1989*18fd37a7SXin LI	($D.tar.gz): New file, takes over old `dist' function.
1990*18fd37a7SXin LI	Don't assume $(distfiles) are all in same directory.
1991*18fd37a7SXin LI
1992*18fd37a7SXin LI	* configure.in (AC_CHECK_HEADERS): Add libintl.h, locale.h.
1993*18fd37a7SXin LI	(AC_CHECK_LIB): Check for -lintl.
1994*18fd37a7SXin LI
1995*18fd37a7SXin LI	* analyze.c (briefly_report): Rewrite `message (A?"B":"C")' as
1996*18fd37a7SXin LI	`if (A) message ("B") : message ("C")'; this is for getmsgids.
1997*18fd37a7SXin LI	(briefly_report, diff_2_files): For label, use file_label if set.
1998*18fd37a7SXin LI	* diff.c (compare_files): Likewise.
1999*18fd37a7SXin LI
2000*18fd37a7SXin LI	* system.h (gettext): Declare; use a stub if ! HAVE_LIBINTL_H.
2001*18fd37a7SXin LI	(setlocale): Declare; use a stub if ! HAVE_LOCALE_H.
2002*18fd37a7SXin LI
2003*18fd37a7SXin LI	* cmp.c, diff.c, diff3.c, sdiff.c (main):
2004*18fd37a7SXin LI	Invoke setlocale first thing, to tell library we're internationalized.
2005*18fd37a7SXin LI	(option_help_msgid): New constant.
2006*18fd37a7SXin LI	(usage): Use it, so message is translated one option at a time.
2007*18fd37a7SXin LI	* sdiff (help_msgid, give_help): Likewise.
2008*18fd37a7SXin LI
2009*18fd37a7SXin LI	* cmp.c (sprintc): Renamed from `printc'.
2010*18fd37a7SXin LI	Now outputs to a buffer instead of stdout.
2011*18fd37a7SXin LI	(cmp): Use new sprintc; it's easier to internationalize.
2012*18fd37a7SXin LI
2013*18fd37a7SXin LI	* diff.c (main): -D FOO now outputs `/* ! FOO */ instead of
2014*18fd37a7SXin LI	`/* not FOO */'.
2015*18fd37a7SXin LI
2016*18fd37a7SXin LI	* sdiff.c (version_string): Fix decl typo: `const' was missing.
2017*18fd37a7SXin LI	(trapsigs): Ignore sigaction failure, to be compatible with `signal'.
2018*18fd37a7SXin LI
2019*18fd37a7SXin LI	* util.c (struct msg, message5, print_message_queue):
2020*18fd37a7SXin LI	Allocate just one block of memory to save a message.
2021*18fd37a7SXin LI
2022*18fd37a7SXin LIWed Nov  9 17:42:44 1994  Paul Eggert  <eggert@twinsun.com>
2023*18fd37a7SXin LI
2024*18fd37a7SXin LI	* sdiff.c (trapsigs): Don't check signal return value, since it's
2025*18fd37a7SXin LI	bogus under djgpp.
2026*18fd37a7SXin LI
2027*18fd37a7SXin LIMon Oct 31 07:27:27 1994  Paul Eggert  <eggert@twinsun.com>
2028*18fd37a7SXin LI
2029*18fd37a7SXin LI	* Makefile.in (srcs, diff_o, diff3_o, sdiff_o):
2030*18fd37a7SXin LI	New files quote.c, quote.o.
2031*18fd37a7SXin LI
2032*18fd37a7SXin LI	* diff.h (function_regexp, ignore_regexp): Replace lists of compiled
2033*18fd37a7SXin LI	regexps with these single compiled regexps.  All users changed.
2034*18fd37a7SXin LI	(regexp_list,function_regexp_list,ignore_regexp_list): Move to diff.c.
2035*18fd37a7SXin LI	* diff.c (add_regexp): Build one big regexp instead of a regexp list.
2036*18fd37a7SXin LI	(summarize_regexp_list): New function.
2037*18fd37a7SXin LI	(regexp_list): Redesigned struct; moved here from diff.h.
2038*18fd37a7SXin LI	(function_regexp_list, ignore_regexp_list): Likewise, for vars.
2039*18fd37a7SXin LI
2040*18fd37a7SXin LI	* context.c (find_function): Simplify interface:
2041*18fd37a7SXin LI	don't return size of function line.  All callers changed.
2042*18fd37a7SXin LI	(print_context_script, find_function): INT_MAX now denotes no
2043*18fd37a7SXin LI	previous match; this is simpler than `- file->prefix_lines - 1'.
2044*18fd37a7SXin LI
2045*18fd37a7SXin LI	* diff3.c (read_diff): Quote arguments with system_quote_arg.
2046*18fd37a7SXin LI	* sdiff.c (main): Use system_quote_arg to compute command.
2047*18fd37a7SXin LI	* diff.c (option_list): Quote options with system_quote_arg.
2048*18fd37a7SXin LI	* util.c (begin_output): Use system_quote_arg to compute command.
2049*18fd37a7SXin LI
2050*18fd37a7SXin LI	* util.c (pr_program): New var.
2051*18fd37a7SXin LI	(analyze_hunk): Fix off-by-1 line length bug.
2052*18fd37a7SXin LI	Match with one big regexp instead of a list of regexps.
2053*18fd37a7SXin LI	Use new `trivial_length' local instead of comparing first byte to `\n'.
2054*18fd37a7SXin LI	Help the compiler with linbuf local vars.
2055*18fd37a7SXin LI
2056*18fd37a7SXin LI	* system.h (system_quote_arg):
2057*18fd37a7SXin LI	New function; replaces SYSTEM_QUOTE_ARG macro.
2058*18fd37a7SXin LI
2059*18fd37a7SXin LISat Oct 15 20:09:12 1994  Paul Eggert  <eggert@twinsun.com>
2060*18fd37a7SXin LI
2061*18fd37a7SXin LI	* system.h (_tolower): Define if not already defined.
2062*18fd37a7SXin LI	* io.c (find_and_hash_each_line): Change tolower to _tolower; this
2063*18fd37a7SXin LI	speeds up diff -i considerably on some hosts (e.g. Solaris 2.3).
2064*18fd37a7SXin LI	* util.c (line_cmp): Likewise.
2065*18fd37a7SXin LI	* ifdef.c (groups_letter_value): Likewise.
2066*18fd37a7SXin LI
2067*18fd37a7SXin LI	* diff.h (ignore_some_line_changes): Remove.  All users changed.
2068*18fd37a7SXin LI	* io.c (find_and_hash_each_line): Don't invoke line_cmp if the length
2069*18fd37a7SXin LI	differs and -i is in force.  Don't assume ISSPACE ('\n') is nonzero.
2070*18fd37a7SXin LI
2071*18fd37a7SXin LI	* diff.h (xmalloc_exit_failure): New variable.
2072*18fd37a7SXin LI	All `main' programs set this variable at the start.
2073*18fd37a7SXin LI	xmalloc and xrealloc are now taken from GNU library.
2074*18fd37a7SXin LI	* cmp.c (main): Align buffer size to word size; some mallocs care.
2075*18fd37a7SXin LI	* io.c (slurp): Likewise.
2076*18fd37a7SXin LI	* diff.c (add_exclude): Can now assume xrealloc (0, ...) works.
2077*18fd37a7SXin LI	(add_regexp): Free storage on failure.  Allocate storage all at one go.
2078*18fd37a7SXin LI	* system.h (malloc, realloc): Remove unused declarations.
2079*18fd37a7SXin LI	* diff3.c, sdiff.c, util.c (xmalloc, xrealloc): Remove.
2080*18fd37a7SXin LI	* sdiff.c (diffarg): Take advantage of cleaner xrealloc semantics.
2081*18fd37a7SXin LI
2082*18fd37a7SXin LI	* io.c (ROL): Use sizeof to make it more generic.
2083*18fd37a7SXin LI
2084*18fd37a7SXin LI	* Makefile.in (common_o): New variable.
2085*18fd37a7SXin LI	Link error.o and xmalloc.o into all programs.
2086*18fd37a7SXin LI	(check): Depend on $(PROGRAMS).
2087*18fd37a7SXin LI
2088*18fd37a7SXin LI	* diff.h (error): Change to GNU library standard.  All callers changed.
2089*18fd37a7SXin LI	* diff3.c (main): Use strerror (EISDIR) instead of "Is a directory".
2090*18fd37a7SXin LI	(fatal, perror_with_exit): Use `error'.
2091*18fd37a7SXin LI	* util.c (perror_with_name, fatal): Use GNU `error'.
2092*18fd37a7SXin LI	(error): Remove.
2093*18fd37a7SXin LI
2094*18fd37a7SXin LIWed Oct 12 17:04:40 1994  David J. MacKenzie  (djm@duality.gnu.ai.mit.edu)
2095*18fd37a7SXin LI
2096*18fd37a7SXin LI	* cmp.c (main): Set xmalloc_exit_failure.
2097*18fd37a7SXin 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,
2290*18fd37a7SXin 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.
2680*18fd37a7SXin 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.
3507*18fd37a7SXin LI	Canceling provisionals near start of run must handle already
3508*18fd37a7SXin LI	canceled provisionals.
3509*18fd37a7SXin 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.
3517*18fd37a7SXin 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
3577*18fd37a7SXin 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
3596*18fd37a7SXin 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.
3623*18fd37a7SXin 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).
3858*18fd37a7SXin LI
3859*18fd37a7SXin LI
3860*18fd37a7SXin LICopyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1997, 1998, 1999,
3861*18fd37a7SXin LI2000, 2001, 2002 Free Software Foundation, Inc.
3862*18fd37a7SXin LI
3863*18fd37a7SXin LIThis file is part of GNU Diffutils.
3864*18fd37a7SXin LI
3865*18fd37a7SXin LIThis program is free software; you can redistribute it and/or modify
3866*18fd37a7SXin LIit under the terms of the GNU General Public License as published by
3867*18fd37a7SXin LIthe Free Software Foundation; either version 2, or (at your option)
3868*18fd37a7SXin LIany later version.
3869*18fd37a7SXin LI
3870*18fd37a7SXin LIThis program is distributed in the hope that they will be useful,
3871*18fd37a7SXin LIbut WITHOUT ANY WARRANTY; without even the implied warranty of
3872*18fd37a7SXin LIMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
3873*18fd37a7SXin LIGNU General Public License for more details.
3874*18fd37a7SXin LI
3875*18fd37a7SXin LIYou should have received a copy of the GNU General Public License
3876*18fd37a7SXin LIalong with this program; see the file COPYING.  If not, write to
3877*18fd37a7SXin LIthe Free Software Foundation, Inc., 59 Temple Place - Suite 330,
3878*18fd37a7SXin LIBoston, MA 02111-1307, USA.
3879