xref: /freebsd/contrib/diff/ChangeLog (revision 84943d6f38e936ac3b7a3947ca26eeb27a39f938)
12004-04-13  Paul Eggert  <eggert@twinsun.com>
2
3	* NEWS, configure.ac (AC_INIT): Version 2.8.7.
4	* configure.ac (AM_GNU_GETTEXT_VERSION): Add.
5	(XGETTEXT): Restore from pre-2004-04-12 version.  This fixes
6	a bug that lost many msgids in doc/diffutils.pot.
7	* bootstrap: New file.
8	* exgettext: Don't generate a temporary file, as this runs afoul
9	of "make distcheck" which operates with read-only directories.
10	* Makefile.am (EXTRA_DIST): Add bootstrap.
11	Remove config/config.rpath as it is deduced automatically these days.
12
132004-04-12  Paul Eggert  <eggert@twinsun.com>
14
15	* NEWS, configure.ac (AC_INIT): Version 2.8.6.
16
17	* NEWS: Add news for 2.8.4, 2.8.6.
18
19	* README: Move copyright notice to end.  Defer to "configure
20	--help" for special "configure" options.  Suggest latest libiconv.
21	Update version numbers of Autoconf etc. to current.
22
23	* configure.ac: Quote various arguments better.
24	(AC_CONFIG_MACRO_DIR): Add call, specifying "m4".
25	(AC_CONFIG_HEADER): Replaces AM_CONFIG_HEADER.
26	(gl_USE_SYSTEM_EXTENSIONS): Replaces AC_GNU_SOURCE.
27	(AC_ISC_POSIX): Remove; nobody ports to ancient ISC any more.
28	(AC_PROG_CPP, AC_PROG_INSTALL, AC_C_INLINE,
29	AC_HEADER_STDBOOL, AC_HEADER_STDC, AM_GNU_GETTEXT, XGETTEXT,
30	AC_HEADER_STAT, AC_FUNC_VPRINTF, jm_FUNC_GLIBC_UNLOCKED_IO,
31	jm_FUNC_GNU_STRFTIME, jm_FUNC_MALLOC, jm_FUNC_REALLOC,
32	jm_PREREQ_C_STACK, jm_PREREQ_ERROR, jm_PREREQ_HARD_LOCALE,
33	jm_PREREQ_QUOTEARG, jm_PREREQ_REGEX, AC_FUNC_FNMATCH_GNU, jm_AC_DOS):
34	Remove; not needed here, as our files don't use them directly
35	or we rely on gnulib modules.
36	(AC_C_CONST): Remove; we assume C89 now.
37	(AC_CHECK_HEADERS): Remove libintl.h, limits.h, stdlib.h, string.h,
38	time.h.
39	(AC_CHECK_TYPE): Remove ptrdiff_t, ssize_t.
40	(AC_CHECK_FUNCS): Remove diraccess, strchr, strerror, tmpnam).
41	(AC_REPLACE_FUNCS): Remove memchr, mkstemp, strcasecmp.
42	(GNULIB_AUTOCONF_SNIPPET): Add call.  This replaces much of
43	the above.
44	(AC_CONFIG_FILES): Remove lib/posix/Makefile.
45	(AC_CONFIG_COMMANDS): Remove.
46
47	* doc/diff.texi (dircategory): Change to "Text creation and
48	manipulation" from "GNU packages".
49	(Translations): New node.
50	(Overview): Improve quality of algorithm citations.
51	(Binary): -q doesn't exactly cause diff to assume files are binary.
52	(Normal): Place after Side by Side, since it's less important.
53	(Detailed Context, Detailed Unified, Detailed ed,
54	Detailed if-then-else, diff3 Hunks, Detailed diff3 Normal):
55	Place at end of menu.
56	(Detailed Unified): Mention that fractional timestamps are
57	omitted on hosts that don't support them.
58	Mention what happens when hunks contain just one line.
59	(Line Group Formats, Reject Names): Fix duplicate-word typos.
60	(Comparing Directories): Trailing white space and empty lines are
61	ignored in the -X file.
62	(diff Options): Add --strip-trailing-cr.
63	(Projects): gnu -> gvc@gnu.org.
64
65	* lib/Makefile.am (SUBDIRS): Remove.
66	(EXTRA_DIST, noinst_HEADERS): Remove most entries.
67	(libdiffutils_a_SOURCES): Now just lib_SOURCES.
68	(lib_SOURCES): New macro.
69	(DISTCLEANFILES, MOSTLYCLEANFILES): Set to empty now.
70	(gnulib.mk): Include: this does most of the work eliminated
71	by the above changes.
72
73	* lib/inttostr.c (inttostr): Protect i < 0 by compile-time
74	test intended to suppress compiler warnings.
75	* lib/inttostr.h: Include limits.h unilaterally.
76	(CHAR_BIT): Remove.
77	(PARAMS): Remove; all uses changed.
78	* lib/setmode.c (__attribute__): New macro.
79	(set_binary_mode): Define only if HAVE_SETMODE_DOS.
80	Otherwise define a dummy static char, as C89 requires
81	that we define something.
82	* lib/setmode.h (set_binary_mode): Return true, not 1.
83
84	* src/analyze.c, src/context.c, src/diff.c, src/io.c, src/util.c:
85	Do not include regex.h, as diff.h does this now.
86
87	* src/cmp.c: Sort includes.  Include <exit.h>, <unlocked-io.h>.
88	(specify_comparison_type): Don't report an error if the comparison
89	type has already been specified the same way as this one.
90
91	* src/cmp.c (usage): Mention exit status.
92	* src/diff.c (option_help_msgid): Likewise.
93	* src/diff3.c (usage): Likewise.
94	* src/sdiff.c (usage): Likewise.
95
96	* src/cmp.c (main): Adjust to latest gnulib c_stack_action
97	calling conventions.
98	* src/diff.c (main): Likewise.
99	* src/diff3.c (main): Likewise.
100	* src/sdiff.c (main): Likewise.
101
102	* src/cmp.c (main): Adjust to latest version_etc calling conventions.
103	* src/diff.c (main): Likewise.
104	* src/diff3.c (main): Likewise.
105	* src/sdiff.c (main): Likewise.
106
107	* src/diff.c: Include <exit.h>.
108	(binary): Define to true if not declared.
109	(longopts): Set tabsize flag to 1.
110	(main): Don't output nanoseconds if platform lacks them.
111	Don't treat files as binary if !binary.
112	(set_mtime_to_now): Use 0, not NULL.
113	(compare_files): Mark files as nonexistent if it looks like
114	'patch' created inaccessible regular empty files to denote
115	nonexistent backups.  Don't compare such files.
116	Clear st_* members of status of	nonexistent file.
117	Remove now-unnecessary tests.
118
119	* src/diff.h: Include regex.h, unlocked-io.h.
120	(struct file_data.changed): Now char *, not bool *, to save
121	space on hosts where bool takes more space than char.
122	All uses changed.
123
124	* src/diff3.c: Include unlocked-io.h.
125	(strip_trailing_cr): New var.
126	(STRIP_TRAILING_CR_OPTION): New enum.
127	(longopts, main, option_help_msgid, read_diff):
128	Add --strip-trailing-cr support.
129	(read_diff): Exit with status 126 (not 127) if errno != ENOENT
130	after failed execvp in child.  Report this in parent.
131
132	* src/dir.c: Include <strcase.h>.
133	(failed_locale_specific_sorting): Renamed from failed_strcoll.
134	All uses changed.
135	(compare_names): Don't invoke strcasecmp first thing when
136	ignore_file_name_case; if locale_specific_sorting, we should
137	just use that.
138
139	* src/ifdef.c (next_line): Remove; replace with...
140	(next_line0, next_line1): New vars.
141	(print_ifdef_script, print_ifdef_hunk):
142	Use them to fix line-number computation bug.
143
144	* src/io.c (find_and_hash_each_line): Don't convert char *
145	to unsigned char *; just leave pointers as char *.  This
146	lessens the number of potentially-dangerous casts.
147	* src/util.c (lines_differ): Likewise.
148
149	* src/sdiff.c: Include <unlocked-io.h>, <exit.h>.
150	(check_child_status): Renamed from ck_editor_status, and
151	accept a new arg MAX_OK_STATUS.  All callers changed.
152	Handle status 126/127 as per POSIX.
153	(edit): Likewise.
154	(main): Likewise.  Fix getopt typo: -E wasn't supported.
155
156	* src/system.h (S_IRWXU, S_IRWXG, S_IRWXO): Define if not defined.
157	(S_IXUSR, S_IXGRP, S_IXOTH): Remove.
158	Include <time.h> unconditionally, since we can assume C89 now.
159	Likewise for <stdlib.h>, <string.h>.
160	(getenv, EXIT_SUCCESS, EXIT_FAILURE, SSIZE_MAX, strchr, strrchr,
161	memcmp, memcpy): Remove decl; no longer needed.
162	(strcasecoll, strcasecmp): Define if not built in.
163	(CTYPE_DOMAIN, ISPRINT, ISSPACE, TOLOWER, _tolower, errno): Remove;
164	we now assume C89 or better.  All uses changed.
165	Include <stdbool.h> unconditionally now, since gnulib supports it
166	if the C compiler doesn't.  All boolean uses of 0 and 1 now
167	changed to false and true.
168	(lin_is_printable_as_long_int): Renamed from lin_is_printable_as_long.
169
170	* src/util.c (begin_output): Fix bug: 0 wasn't cast to char * arg,
171	which led to undefined behavior on 64-bit hosts.
172	Use more-standard test for exit status 126 versus 127.
173	(finish_output): Likewise.
174	(analyze_hunk): Do not cast bool to int.
175
1762004-03-15  Paul Eggert  <eggert@twinsun.com>
177
178	* src/cmp.c (main): Don't consider two files with the same name to
179	be the same, if their initial skip values differ.  This fixes a
180	bug reported by Hideki Iwamoto in
181	<http://mail.gnu.org/archive/html/bug-gnu-utils/2004-03/msg00024.html>.
182
1832004-03-11  Paul Eggert  <eggert@twinsun.com>
184
185	* src/analyze.c (diag): Return void, not lin, since the return
186	value wasn't needed.  All callers changed.
187	(diag, diff_2_files):
188	Use 'true' and 'false' instead of '1' and '0', when appropriate.
189	(compareseq): Use lin const * local variables instead of lin *.
190	Don't bother checking diag's return value.
191	(shift_boundaries, build_reverse_script, build_script, diff_2_files):
192	Use char arrays, not bool arrays, since
193	sizeof (bool) might be greater than 1.
194
1952004-02-09  Paul Eggert  <eggert@twinsun.com>
196
197	* m4/setmode.m4 (AC_FUNC_SETMODE_DOS): AC_LIBOBJ(setmode) if
198	we would return true.
199
2002002-10-14  Paul Eggert  <eggert@twinsun.com>
201
202	* src/Makefile.am (diff3.$(OBJEXT), diff.$(OBJEXT),
203	sdiff.$(OBJEXT)): Rename from (misspelled) diff3.$(OBJECT),
204	diff.$(OBJECT), sdiff.$(OBJECT).  Patch by Paul D. Smith in
205	<http://mail.gnu.org/pipermail/bug-gnu-utils/2002-October/003251.html>.
206	Bug reported by Chris Bainbridge.
207
2082002-10-13  Paul Eggert  <eggert@twinsun.com>
209
210	* src/Makefile.am (MOSTLYCLEANFILES): Add paths.ht.
211	(paths.h): Send output to paths.ht first, and then rename to
212	paths.h at the end.  This avoids problems if the disk is full.
213	It also works around what appears to be a bug with GNU make -j
214	(3.79.1); see <http://bugs.gentoo.org/show_bug.cgi?id=8934>.
215
2162002-06-27  Paul Eggert  <eggert@twinsun.com>
217
218	* NEWS, configure.ac (AC_INIT): Version 2.8.4.
219
220	* config/config.sub: Sync with latest version maintained in other
221	packages.
222
223	* lib/file-type.h: Protect against double inclusion.  Detect
224	whether <sys/stat.h> has been included.  Fix from Jim Meyering.
225
226	* src/analyze.c (briefly_report): Don't say "Binary files differ",
227	since one of the files may not be a binary file.
228	Bug reported by Dan Jacobson.
229
2302002-06-22  Paul Eggert  <eggert@twinsun.com>
231
232	* lib/c-stack.c (segv_handler, c_stack_action) [! defined
233	SA_SIGINFO]: Do not assume SA_SIGINFO behavior.
234	Bug reported by Jim Meyering on NetBSD 1.5.2.
235
2362002-06-16  Paul Eggert  <eggert@twinsun.com>
237
238	* NEWS, configure.ac (AC_INIT): Version 2.8.3.
239
240	* config/depcomp, config/missing, README: Update to automake 1.6.2.
241
242	* po/LINGUAS: Add en_US.
243	* po/en_US.po: New file.
244	* po/POTFILES.in: Remove lib/freesoft.c.
245	Add lib/file-type.c, lib/version-etc.c, lib/xmalloc.c.
246
2472002-06-15  Paul Eggert  <eggert@twinsun.com>
248
249	* doc/diff.texi (Special Files): Document behavior of symlink
250	loops.
251
252	* lib/Makefile.am (noinst_HEADERS): Remove freesoft.h.
253	Add version-etc.h.
254	(libdiffutils_a_SOURCES): Remove freesoft.c.  Add version-etc.c.
255	* lib/freesoft.c, lib/freesoft.h: Remove.
256	* lib/version-etc.h (PARAMS): Remove; we now assume C89 at least.
257
258	* lib/version-etc.h (version_etc): Remove package and version args.
259	(version_etc_copyright): Remove.
260	* lib/version-etc.c: Likewise.
261	Do not include unlocked-io.h; no longer needed.
262	Include gettext.h rather than libinto.h.
263	(_): Define unconditionally.
264	(version_etc): Adjust wording to match current GNU coding standards.
265	Translate "(C)" if possible.
266
267	* lib/version-etc.c, lib/version-etc.h: New files, taken from
268	fileutils.
269
270	* src/Makefile.am (cmp_SOURCES, diff3_SOURCES, sdiff_SOURCES,
271	diff_SOURCES): Remove version.c.
272	(MAINTAINERCLEANFILES, $(srcdir)/version.c): Remove.
273
274	* src/cmp.c: Include version-etc.h, not freesoft.h.
275	(copyright_notice): Remove.
276	(main): Use version_etc to print version.
277	* src/diff.c, src/diff3.c, src/sdiff.c: Likewise.
278
279	* src/cmp.c (version_string): Remove decl.
280	* src/diff.h, src/diff3.c, src/sdiff.c: Likewise.
281
2822002-06-11  Paul Eggert  <eggert@twinsun.com>
283
284	* lib/fnmatch.c, lib/fnmatch_loop.c (WIDE_CHAR_SUPPORT):
285	New macro.  Use it uniformly instead of
286	(defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H).
287	It also uses HAVE_BTOWC, to fix a porting bug on Solaris 2.5.1
288	reported by Vin Shelton.
289	* m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for btowc.
290
291	* NEWS, configure.ac (AC_INIT): Version 2.8.2.
292
293	* ABOUT-NLS, config/config.guess, config/config.sub,
294	config/depcomp, config/texinfo.tex, lib/posix/regex.h,
295	m4/c-bs-a.m4, m4/gettext.m4, m4/gnu-source.m4, m4/lib-link.m4,
296	m4/malloc.m4:
297	Update to recent version (maintained in other packages).
298	* m4/prereq.m4 (jm_PREREQ_EXCLUSIVE): AC_FUNC_FNMATCH_GNU
299	no longer takes a lib.
300
301	* README: Incorporate contents from INSTALLME.
302	* INSTALLME: Remove.
303	* Makefile.am (EXTRA_DIST): Remove INSTALLME.
304
305	* configure.ac (AC_GNU_SOURCE): Move up, so that it affects
306	later compilations properly.
307	(DEFAULT_DIFF_PROGRAM, AC_TYPE_SIGNAL): Remove.
308	(jm_AC_TYPE_INTMAX_T): Add.
309	(AC_FUNC_FNMATCH_GNU): Use this, instead of AC_FUNC_FNMATCH.
310	(AC_CONFIG_LINKS): regex.hin renamed from regex_.h.
311
312	* doc/diff.texi: Reword "@option{-f} and @option{--foo}" to
313	"@option{-f} or @option{--foo}".
314	Use @acronym instead of @sc where appropriate.
315	(Specified Lines): Renamed from Specified Folding.
316	(Comparison, Blank Lines):
317	Clarify wordings for Blank Lines and Specified Lines nodes.
318	(Binary): Mention --verbose and --print-bytes.
319	(Tabs, sdiff Option Summary, diff Options):
320	New option --tabsize=COLUMNS.
321
322	* lib/Makefile.am (EXTRA_DIST): Add fnmatch_loop.c.
323	(noinst_HEADERS): fnmatch_.h renamed from fnmatch.hin.
324	regex_.h renamed from regex.hin.
325	Add file-type.h.
326	(libdiffutils_a_SOURCES): Add file-type.c.
327	(DISTCLEANFILES): Remove fnmatch.hno, regex.hno.
328
329	* lib/c-stack.c (__attribute__): New macro.
330	(EOVERFLOW): Define if not defined.
331	(stack_t): Define to struct sigaltstack if not defined or declared.
332	Include <sys/resource.h>, <ucontext.h> if available.
333	Include <stdio.h> if DEBUG.
334	Do not include <inttypes.h> or <stdint.h>.
335	(c_stack_die): Remove info and context args.  All uses changed.
336	(segv_action): Likewise.
337	(alternate_signal_stack): Change uintmax_t to long, to ease porting.
338	(get_stack_location, min_address_from_argv, max_address_from_argv,
339	null_action): New functions.
340	(stack_base, stack_size): New vars.
341	(segv_handler): context arg may not be used.
342	Use global stack_base, stack_size if
343	! HAVE_XSI_STACK_OVERFLOW_HEURISTIC.
344	Add debug code.
345	Invoke die (rather than segv_action) to exit.
346	(c_stack_action): Accept new argv arg, and simpler handler arg.
347	All uses changed.  Move code into new functions above.
348	Allow null action.
349	[! (defined SA_ONSTACK && defined _SC_PAGESIZE)]: Assume all segvs
350	are stack overflows.
351	(main) [DEBUG]: Describe what output should be like.
352
353	* lib/c-stack.h (siginfo_t, c_stack_die): Remove decl.
354
355	* lib/file-type.c, lib/file-type.h: New files.  These contain code
356	that was in src/diff.c, but is now librarified and spiffed up a
357	bit.  Jim Meyering suggested this.
358
359	* lib/fnmatch.c (alloca, __builtin_expect): Define for non-GCC hosts.
360	<strings.h>: Include only if HAVE_STRINGS_H.
361	<stddef.h>: Include if we include stdlib.h.
362	Do not comment out all code if ! HAVE_FNMATCH_GNU.
363	(getenv): Do not declare if HAVE_DECL_GETENV.
364	(__strchrnul, __wcschrnul): Remove; not used.
365	(MEMPCPY): Use mempcpy if not _LIBC; use memcpy if neither _LIBC
366	nor HAVE_MEMPCPY.
367	(FOLD) [HANDLE_MULTIBYTE]: Do not pass wide char to ISUPPER.
368	(STRLEN, STRCAT, MEMPCPY) [HANDLE_MULTIBYTE && !defined _LIBC]:
369	Use wcslen rather than __wcslen, and likewise for wcscat, wmempcpy.
370	(MEMPCPY) [HANDLE_MULTIBYTE]: Use wmempcpy if not _LIBC; use wmemcpy
371	if neither _LIBC nor HAVE_WMEMPCPY.
372	* lib/fnmatch_.h (__const): Do not define to empty, as this breaks
373	Sun cc.  The code doesn't work with K&R anyway.
374	* lib/fnmatch_loop.c (struct patternlist.str): Size 1, not 0,
375	as C89 requires this.
376	(NEW_PATTERN): Use offsetof, not sizeof, since str now has size 1.
377	* lib/fnmatch_.h: Import from glibc fnmatch.h.
378	* lib/fnmatch.c, lib/fnmatch_loop.c: Import from glibc.
379
380	* lib/posixver.c: Include posixver.h.
381
382	* lib/regex_.h: Renamed from lib/regex.hin.
383
384	* m4/c-stack.m4 (jm_PREREQ_C_STACK): Do not AC_REQUIRE
385	jm_AC_TYPE_UINTMAX_T and do not use uintmax_t.
386	Check for sys/resource.h, uccontext.h.
387	Check for decls and existence of getcontext, sigaltstack.
388	Check for stack_t.
389
390	* m4/codeset.m4, m4/glibc21.m4, m4/lcmessage.m4: Remove.
391
392	* m4/fnmatch.m4: Update to latest Autoconf CVS for AC_FUNC_FNMATCH_GNU.
393	* m4/gnu-source.m4: Likewise, for AC_GNU_SOURCE (renamed from
394	AC__GNU_SOURCE).
395
396	* m4/mbstate_t.m4 (AC_TYPE_MBSTATE_T): Renamed from AC_MBSTATE_T.
397	All uses changed.  Upgrade to recent Autoconf CVS.
398
399	* m4/stdbool.m4 (AC_HEADER_STDBOOL): Do not cast pointer to
400	bool in integer constant expression; C99 does not allow it.
401	Reported by Bruno Haible.
402
403	* po/LINGUAS: Add hu, pt_BR.
404	* po/hu.po, po/pt_BR.po: New files.
405
406	* src/Makefile.am (noinst_HEADERS): Remove diff.h.
407	(DEFS): Remove.
408	(diff_sources): Add diff.h.
409	(MOSTLYCLEANFILES): New macro.
410	(cmp.$(OBJEXT) diff3.$(OBJECT) diff.$(OBJECT) sdiff.$(OBJECT)): Depend
411	on paths.h.
412	(paths.h): New rule.
413
414	* src/analyze.c, src/cmp.c, src/diff.c, src/diff3.c, src/io.c,
415	src/sdiff.c: Include <file-type.h>.
416
417	* src/cmp.c: Include paths.h.
418	(copyright_notice): Renamed from copyright_string.
419	Now a msgid, so that copyright symbol can be translated.
420	All uses changed.
421	* src/diff.c, src/diff3.c, src/sdiff.c: Likewise.
422
423	* src/diff.c: Include posixver.h.
424	(TABSIZE_OPTION): New constant.
425	(main): Allow widths up to SIZE_MAX.
426	(filetype): Move to lib/file-type.c and rename to file_type.
427	All uses changed.
428
429	* src/diff.c (longopts, main, usage): New option --tabsize=COLUMNS.
430	* src/io.c (find_and_hash_each_line): Likewise.
431
432	* src/diff.h (TAB_WIDTH): Remove.
433	(tabsize): New decl.
434	(sdiff_half_width, sdiff_column2_offset): Now size_t rather than
435	unsigned int.
436
437	* src/diff3.c (skipwhite, readnum): New functions.
438	(process_diff_control): Use them.
439	(SKIPWHITE, READNUM): Remove.
440	(read_diff): Don't worry about errno == ENOEXEC.
441
442	* src/sdiff.c (catchsig, signal_handler, initial_action): Signal
443	handlers return void, not RETSIGTYPE, since we no longer support
444	K&R.
445	(TABSIZE_OPTION): New constant.
446	(longopts, usage, main): New option --tabsize=COLUMNS.
447	(cleanup): New arg signo.  All uses changed.
448	(ck_editor_status, main, edit): Don't worry about ENOEXEC.
449
450	* src/side.c (tab_from_to, print_half_line, print_1sdiff_line):
451	New option --tabsize=COLUMNS.
452
453	* src/system.h (S_ISBLK, S_ISCHR, S_ISDIR, S_ISFIFO, S_ISREG,
454	S_ISSOCK): Remove; now in lib/file-type.h.
455
456	* src/util.c (finish_output): Check for ENOEXEC.
457	(lines_differ, output_1_line): New option --tabsize=COLUMNS.
458	(analyze_hunk): If -b or -w is also specified, -B now considers
459	lines to be empty if they contain only white space.
460
4612002-04-05  Paul Eggert  <eggert@sic.twinsun.com>
462
463	* NEWS, configure.ac (AC_INIT): Version 2.8.1.
464
465	* configure.ac (AC_HEADER_STDBOOL): Add.
466	(AC_CHECK_HEADERS): Remove stdbool.h.
467	* m4/stdbool.m4: New file.
468	* m4/prereq.m4 (jm_PREREQ_EXCLUDE):
469	Use AC_HEADER_STDBOOL rather than AC_CHECK_HEADERS(stdbool.h).
470	(jm_PREREQ_HASH): Likewise.
471
472	* src/system.h (SSIZE_MAX): Define if limits.h doesn't.
473
474	* src/analyze.c (diff_2_files): Assign PTRDIFF_MAX - 1 to a
475	size_t variable, just in case there's a problem with ptrdiff_t
476	versus size_t.
477
478	* lib/cmpbuf.c (errno): Remove decl; K&R C is no longer supported.
479	Include limits.h.
480	(SIZE_MAX, SSIZE_MAX): Define if standard headers don't.
481	(MIN): New macro.
482	(block_read): Do not attempt to read more than SSIZE_MAX bytes, as the
483	resulting behavior is implementation-defined.  Work around bug in
484	Tru64 5.1, which can't read more than INT_MAX bytes at a time.
485	* src/cmp.c (cmp): Use block_read instead of read, to work
486	around Tru64 5.1 bug.
487	* src/diff3.c (read_diff): Likewise.
488	* src/diff3.c: Include cmpbuf.h.
489
490	* THANKS: Add Ulrich Drepper.
491
492	* INSTALLME: Mention GNU texinfo.
493
494	* doc/diff.texi:
495	Use new @copying directive.
496	Put @contents first, not last, since Texinfo now suggests this.
497	Fix bug in -w documentation noted by Karl Berry.
498	Mention links for speedup.
499	New node "Speedups" for future speedups.
500	Just say "Index", not "Concept Index".
501
5022002-03-26  Paul Eggert  <eggert@twinsun.com>
503
504	* src/Makefile.am:
505	(INCLUDES): Remove this obsolete macro,	replacing it with:
506	(AM_CPPFLAGS): New macro.
507
5082002-03-26  Albert Chin-A-Young  <china@thewrittenword.com>
509
510	* src/Makefile.am (datadir): Remove, as it conflicts with --datadir.
511
5122002-03-26  Paul Eggert  <eggert@twinsun.com>
513
514	* doc/diff.texi (dircategory GNU packages): Fix typo: a "* " was
515	missing before the menu entry.  Bug diagnosed by Adam Heath.
516	Also, put this dircategory after the Individual utilities dircategory,
517	to work around a compatibility problem with Debian install-info.
518
5192002-03-24  Eli Zaretskii  <eliz@is.elta.co.il>
520
521	* src/io.c (sip): Do not mishandle buffered count when reverting
522	to text mode.
523
5242002-03-23  Paul Eggert  <eggert@twinsun.com>
525
526	* NEWS, configure.ac (AC_INIT): Version 2.8.
527	* configure.ac (AC_PREREQ): 2.53.
528	* INSTALLME: Upgrade to gettext 0.11.1 and help2man 1.27.
529
530	* doc/diff.texi: Upgrade the description of `patch' to GNU patch
531	2.5.4, and revamp the documentation accordingly.
532
533	* src/diff.c (main): Fix typo that prevented diff -y from working.
534	Bug reported by Mitsuru Chinen.
535
5362002-03-15  Paul Eggert  <eggert@twinsun.com>
537
538	* lib/c-stack.c (c_stack_die) [!HAVE_SIGINFO_T]: Don't use info.
539	Bug reported by Eli Zaretskii.
540
5412002-03-15  Eli Zaretskii  <eliz@is.elta.co.il>
542
543	* ms/config.sed: Tweak editing of install-info-am target.
544
5452002-03-12  Paul Eggert  <eggert@twinsun.com>
546
547	* NEWS, configure.ac (AC_INIT): Version 2.7.10.
548
549	* NEWS: cmp -l -s and cmp -s -l are not allowed.
550	Deprecate diff -h, -H, -L, -P, --inhibit-hunk-merge.
551
552	* configure.ac (jm_PREREQ_HARD_LOCALE): Add.
553	(AM_INIT_AUTOMAKE): Do not distribute shar file.
554
555	* doc/diff.texi (Overview): byte != character.
556	(Detailed Context, Detailed Unified, Alternate Names, diff Options):
557	Do not document diff -L.
558	(Comparing Directories, Making Patches, diff Options):
559	Do not document diff -P.
560	(diff Performance, sdiff Option Summary, diff Options, sdiff Options):
561	Do not document diff -H.
562	(diff Performance, diff Options): Do not document --horizon-lines.
563	(cmp Options): Prefer -b to -c.
564	(cmp Options, diff Options, diff3 Options, patch Options,
565	sdiff Options): Put short options next to the similar long options.
566	Document --help, and use the same wording for --verbose.
567	(diff3 Options): Fix typo in description of -E, which used wrongly used
568	"-e" instead of "-E".
569
570	* lib/hard-locale.c (alloca): Remove.
571	Include stdlib.h if available, for malloc.
572	(hard_locale): Use malloc, not alloca, so that we need not worry about
573	alloca issues.  Test for storage allocation failure.
574
575	* m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_HARD_LOCALE.
576	(jm_PREREQ_HARD_LOCALE): New macro.
577
578	* src/cmp.c (specify_comparison_type): New function.
579	(check_stdout): "indices and codes" -> "byte numbers and values"
580	(main): Detect clashing options.
581	(cmp): Use "byte" rather than "char" if a translation for "byte"
582	is available, even when in the POSIX locale.
583
584	* src/diff.c (option_help_msgid): Do not document -L, -P,
585	--horizon-lines, --inhibit-hunk-merge, -H.
586	* src/diff.h: -L -> --label
587
5882002-03-11  Paul Eggert  <eggert@twinsun.com>
589
590	* NEWS, configure.ac (AC_INIT): Version 2.7.9.
591
592	* INSTALLME: Update to autoconf 2.53, automake 1.6, help2man
593	1.25 with patch.
594
595	* configure.ac (AC_INIT):
596	Change package name from diff to diffutils.
597	(AM_INIT_AUTOMAKE): Use new form, with option gnits,
598	rather than old from that duplicated AC_INIT.
599	(AM_MISSING_PROG): Add help2man.
600	(REGEX_MALLOC): Define.
601	(AC_CONFIG_FILES): Add man/Makefile.
602
603	* Makefile.am (AUTOMAKE_OPTIONS): Remove.
604	* doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
605	* lib/Makefile.am (AUTOMAKE_OPTIONS): Likewise.
606	* ms/Makefile.am (AUTOMAKE_OPTIONS): Likewise.
607	* src/Makefile.am (AUTOMAKE_OPTIONS): Likewise.
608
609	* lib/c-stack.c: Include <errno.h>
610	(ENOTSUP): Define if errno.h doesn't.
611	(SA_NODEFER, SA_ONSTACK, SA_RESETHAND, SA_SIGINFO, SIGSTKSZ,
612	_SC_PAGESIZE, ALTERNATE_STACK_SIZE, stack_t, sigaltstack):
613	Remove; we now assume them all when
614	HAVE_XSI_STACK_OVERFLOW_HEURISTIC, so we don't need
615	substitutes.
616	(<ucontext.h>): Include only if HAVE_XSI_STACK_OVERFLOW_HEURISTIC.
617	(alternate_signal_stack): Now of size SIGSTKSZ.
618	(segv_handler): Simplify, under the assumption that
619	HAVE_XSI_STACK_OVERFLOW_HEURISTIC is nonzero.
620	(c_stack_action): Likewise.
621	(exit_failure) [DEBUG]: Initialize to 0, not 1.
622	(recurse, main) [DEBUG]: Remove main args.
623
624	* m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Change
625	wording of message.  Do not check for stdbool.h or ucontext.h,
626	or for ucontext_t or sigaction or sigaltstack.
627
628	* po/LINGUAS: Add zh_TW.
629
630	* Makefile.am (SUBDIRS): Add man.
631	* man/Makefile.am: New file.
632	* src/cmp.c (usage): Reword for help2man.
633	* src/diff.c (option_help_msgid): Likewise.
634	* src/diff3.c (option_help_msgid, usage): Likewise.
635	* src/sdiff3.c (option_help_msgid, usage): Likewise.
636	Reword for help2man.
637
638	* THANKS: Add email address for Tower.
639
640	* config/config.guess, config/config.sub, config/depcomp,
641	config/install-sh, config/mdate-sh, config/missing,
642	config/mkinstalldirs, config/texinfo.tex: Update
643	to recent version (maintained in other packages).
644
6452002-03-04  Bruno Haible <haible@ilog.fr>
646
647	* m4/gettext.m4 (AM_GNU_GETTEXT): Set LIBINTL and LTLIBINTL to empty if
648	no preinstalled GNU gettext was found.
649
6502002-03-02  Eli Zaretskii  <eliz@is.elta.co.il>
651
652	* ms/config.sed: Tweak editing of install-info-am and
653	uninstall-info-am targets, to include 8+3-butchered names of Info
654	files.
655
6562002-02-28  Paul Eggert  <eggert@twinsun.com>
657
658	* NEWS, configure.ac (AC_INIT, AM_INIT_AUTOMAKE): Version 2.7.8.
659
660	* doc/diff.texi: Add vr index.
661	Update copyright to 2002.
662	(Standards conformance): New chapter.
663	(Binary): Differing binary files are trouble unless the user asked for
664	brief output.
665	(Detailed Context): Prefer ISO time stamp format in discussion.
666	(Detailed Unified, Pagination): Likewise.
667	(Less Context): Likewise.  Also use short option.
668	(Alternate Names): Separate option from arg.
669	(Making Patches): Mention -U 2.
670	(diff Options): Deprecate -LINES, as POSIX 1003.1-2001 does not
671	allow it.
672
673	* INSTALLME: Update advice for Solaris installation problems.
674	We no longer use a test version of gettext.
675	Autoconf test version updated from 2.52f to 2.52h.
676	POSIX 1003.1-2001 patch for Automake.
677
678	* configure.ac (AC__GNU_SOURCE): Add this,
679	replacing AH_VERBATIM of _GNU_SOURCE.
680	(tempname): Use AC_LIBOBJS, not LIBOBJS=, as now required by autoconf.
681	(jm_PREREQ_C_STACK): Add.
682	(AC_CONFIG_FILES): Remove intl/Makefile.
683	(AM_GNU_GETTEXT): Add external arg, from gettext 0.11.
684
685	* lib/c-stack.c, lib/c-stack.h, lib/exitfail.c, lib/exitfail.h,
686	lib/posixver.c, lib/posixver.h, m4/c-stack.m4, m4/gnu-source.m4,
687	po/cs.po, po/ja.po: New files.
688
689	* intl/ChangeLog, intl/Makefile.in, intl/VERSION,
690	intl/bindtextdom.c, intl/config.charset, intl/dcgettext.c,
691	intl/dcigettext.c, intl/dcngettext.c, intl/dgettext.c,
692	intl/dngettext.c, intl/explodename.c, intl/finddomain.c,
693	intl/gettext.c, intl/gettextP.h, intl/gmo.h, intl/hash-string.h,
694	intl/intl-compat.c, intl/l10nflist.c, intl/libgnuintl.h,
695	intl/loadinfo.h, intl/loadmsgcat.c, intl/localcharset.c,
696	intl/locale.alias, intl/localealias.c, intl/localename.c,
697	intl/ngettext.c, intl/os2compat.c, intl/os2compat.h, intl/osdep.c,
698	intl/plural-eval.c, intl/plural-exp.c, intl/plural-exp.h,
699	intl/plural.c, intl/plural.y, intl/ref-add.sin, intl/ref-del.sin,
700	intl/textdomain.c, m4/isc-posix.m4, m4/libtool.m4: Remove.
701
702	* ABOUT-NLS: Update to Gettext 0.11.
703
704	* Makefile.am (SUBDIRS): Remove intl.
705
706	* config/config.guess, config/config.rpath, config/config.sub,
707	config/texinfo.tex, config/depcomp, config/texinfo.tex,
708	lib/tempname.c: Update to latest version from other packages.
709
710	* lib/xalloc.h (xalloc_exit_failure): Remove; subsumed by exit_failure.
711	* lib/xmalloc.c: Include exitfail.h.
712	(xalloc_exit_failure): Remove; subsumed by exit_failure.
713	All uses changed.
714
715	* lib/Makefile.am (noinst_HEADERS): Add c-stack.h, exitfail.h.
716	(libdiffutils_a_SOURCES): Add c-stack.c, exitfail.c, quotesys.c.
717	(INCLUDES): Remove.
718
719	* lib/cmpbuf.h (buffer_lcm): New arg LCM_MAX.
720	* lib/cmpbuf.c: Include errno.h.
721	(errno): Declare if !STDC_HEADERS.
722	Include signal.h.
723	(SA_RESTART): Define if not already defined.
724	Include <inttypes.h>.
725	(PTRDIFF_MAX): Define if not already defined.
726	(TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Likewise.
727	(block_read): Accommodate ancient AIX hosts that set errno to EINTR
728	after uncaught SIGCONT.
729	(buffer_lcm): Return a reasonable size if the multiple is too large.
730	New arg LCM_MAX.  All callers changed.
731
732	* lib/hard-locale.c: Include "hard-locale.h".
733	(hard_locale): Ignore ENABLE_NLS, since we want to operate on
734	locales other than LC_MESSAGES.
735
736	* m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_POSIXVER.
737	(jm_PREREQ_POSIXVER): New macro.
738
739	* m4/setmode.m4 (AC_FUNC_SETMODE_DOS):
740	Check for fcntl.h and unistd.h unconditionally.
741	Suggested by Bruno Haible.
742
743	* po/LINGUAS: Add cs, ja.
744	* po/POTFILES.in: Add lib/c-stack.c, src/dir.c.
745
746	* src/Makefile.am (datadir): @DATADIRNAME@ -> share.
747	(INCLUDES): Remove intl.
748	(LDADD): Change INTLLIBS to LIBINTL.
749	No longer need to link libdiffutils.a twice.
750
751	* src/analyze.c (diff_2_files):
752	Avoid arithmetic overflow in buffer size calculation.
753
754	* src/cmp.c: Include c-stack.h, exitfail.h.
755	(hard_locale_LC_MESSAGES): Depend on ENABLE_NLS.
756	(try_help, check_stdout, main, cmp): 2 -> EXIT_TROUBLE.
757	(main): Check for stack overflow.
758	0 -> EXIT_SUCCESS.
759	1 -> EXIT_FAILURE.
760	(cmp): Likewise.
761	Accommodate ancient AIX hosts that set errno to
762	EINTR after uncaught SIGCONT.
763
764	* src/context.c (pr_context_hunk):
765	Do not dump core if an enormous context causes an
766	arithmetic overflow.
767	(pr_unidiff_hunk): Likewise.
768	(find_hunk): Likewise.
769
770	* src/diff.h: unsigned -> unsigned int.
771	* src/diff.c: Include c-stack.h, exitfail.h.
772	Do not include signal.h.
773	(specify_style, specify_value): Bring these routines back, as POSIX
774	requires that the order of options not matter.
775	(shortopts): New constant.
776	(group_format_option, line_format_option): New constants.
777	(main): 0 -> EXIT_SUCCESS, 1 -> EXIT_FAILURE, 2 -> EXIT_TROUBLE.
778	Ensure that order of options does not matter.
779	Check for stack overflow.
780	If contexts overflow, substitute LIN_MAX, as that's good enough.
781	If multiple contexts are specified, use their maximum.
782	-c is equivalent to -C 3 now, instead of having an implicit context;
783	likewise for -u and -U 3.
784	Use specify_style and specify_value.
785	(SIGCHLD): Do not define; now done in a header.
786	Use new style time stamp format for -u / -U.
787	Reject numeric-string options if operating in POSIX 1003.1-2001 mode.
788	Avoid overflow problems with tab width.
789	Simplify from-file and to-file code.
790	(usage): Do not mention obsolete options.
791	(filetype): Do not mention whether a file is executable.
792	Add typed memory objects.
793	(compare_files): 0 -> EXIT_SUCCESS, 1 -> EXIT_FAILURE, 2 ->
794	EXIT_TROUBLE.
795
796	* src/diff3.c: Include c-stack.h, exitfail.h.
797	(ALLOCATE): Remove.  All uses changed to xmalloc, or to xmalloc plus
798	an overflow check.
799	(myread): Remove.
800	(main): Check for stack overflow.
801	0 -> EXIT_SUCCESS, 1 -> EXIT_FAIULRE, 2 -> EXIT_TROUBLE.
802	(try_help): Likewise.
803	(process_diff): Check for integer overflow, to avoid core dumps.
804	2 -> EXIT_TROUBLE.
805	(read_diff): Exit with status 126 if the file is not executable,
806	for compatibility with POSIX 1003.1-2001.
807	Accommodate ancient AIX hosts that set errno to EINTR after uncaught
808	SIGCONT.
809	Check for integer overflow to avoid core dumps.
810	(fatal, perror_with_exit): 2 -> EXIT_TROUBLE.
811
812	* src/dir.c (dir_read):
813	Ignore st_size of directories: POSIX says it's garbage.
814	Check for integer overflow to avoid core dumps.
815	(diff_dirs): 0 -> EXIT_SUCCESS, 2 -> EXIT_TROUBLE.
816
817	* src/ifdef.c: Include <xalloc.h>.
818	(format_group, print_ifdef_lines): Avoid core dumps with bad formats.
819	(do_printf_spec): Avoid alloca.
820
821	* src/io.c (sip):
822	Avoid integer overflow and core dumps if buffer alignments are
823	preposterously incompatible.
824	(slurp): Do not dump core if the file is growing as we read it.
825	If a regular file grows, keep reading until we catch up with its EOF.
826	(find_and_hash_each_line): Check for integer overflow to avoid cores.
827	(GUESS_LINES): Remove.
828	(guess_lines): New function.  Avoid integer overflow.
829	(find_identical_ends): Use it.
830	Avoid integer overflow and possible core dumps.
831
832	* src/sdiff.c: Include c-stack.h, exitfail.h.  Do not include signal.h.
833	0 -> EXIT_SUCCESS, 1 -> EXIT_FAILURE, 2 -> EXIT_TROUBLE.
834	(ck_editor_status): New function.
835	(main): Check for stack overflow.
836	Adopt POSIX convention for subsidiary programs not found.
837	(diffarg): Check for integer overflow to avoid core dumps.
838	(trapsigs): Remove SA_INTERRUPT special case; now done by header.
839	(SIGCHLD): Likewise.
840	(edit): Adopt POSIX convention for subsidiary programs not found.
841
842	* src/side.c: unsigned -> unsigned int.
843
844	* src/system.h: Don't use alloca or include <alloca.h>.
845	unsigned -> unsigned int
846	(EXIT_SUCCESS, EXIT_FAILURE, EXIT_TROUBLE): Define if not defined.
847	Include signal.h.
848	(SA_RESTART): Define if not defined.
849	(SIGCHLD): Likewise.
850
851	* src/util.c: 2 -> EXIT_TROUBLE.
852	Adopt POSIX convention for ENOEXEC and exit status 126.
853	unsigned -> unsigned int
854
8552002-01-24  Paul Eggert  <eggert@twinsun.com>
856
857	* NEWS, configure.ac (AC_INIT, AM_INIT_AUTOMAKE): Version 2.7.7.
858
859	* intl/plural.c: Regenerate with Bison 1.31.
860
861	* ABOUT-NLS, intl/*: Update to Gettext 0.11-pre5++.
862	* INSTALL: Update to Autoconf 2.52f.
863
864	* INSTALLME: New file.
865	* Makefile.am (EXTRA_DIST): Add config/config.rpath, INSTALLME.
866	(DISTCLEANFILES): Remove.
867	* NEWS: Reformat for imminent 2.8 release.
868	* README: Mention INSTALLME.
869	* README-alpha: Move most of contents to INSTALLME.
870	* THANKS: Add Bruno Haible, Jim Meyering, and Eli Zaretskii.
871
872	* config: New subdirectory, containing the following files from .:
873	config.guess, config.sub, depcomp, missing, install-sh, mkinstalldirs.
874	Move the following files here from doc: texinfo.tex, mdate-sh.
875	* config/config.guess, config/config.sub, config/texinfo.tex:
876	Update to latest version from FSF.
877	* config/config.rpath: New file, from Gettext 0.11-pre5++.
878
879	* configure.ac (AC_INIT): Use new 3-arg form.
880	(AC_CONFIG_SRCDIR): Specify src/diff.c here, not in AC_INIT.
881	(ALL_LINGUAS): Remove: now in po/LINGUAS as per Gettext 0.11.
882	(AC_CONFIG_AUX_DIR): New macro invocation.
883
884	* lib/Makefile.am (noinst_HEADERS): Add gettext.h.
885	* lib/gettext.h: New file, from Gettext 0.11-pre5++.
886	* lib/prepargs.c: Include <string.h>.  Reported by Bruno Haible.
887
888	* m4/codeset.m4, m4/gettext.m4, glibc21.m4, iconv.m4, isc-posix.m4,
889	lcmessage.m4, progtest.m4: Upgrade to Gettext 0.11-pre5++.
890	* m4/lib-ld.m4, m4/lib-link.m4, m4/lib-prefix.m4: New files, from
891	Gettext 0.11-pre5++.
892
893	* po/LINGUAS: New file.
894	* po/Makefile.in.in: Upgrade to Gettext 0.11-pre5++.
895	* po/Makevars, po/Rules-quot, po/boldquot.sed: New files,
896	from Gettext 0.11-pre5++.
897
898	* src/cmp.c (copyright_string): Update to 2002.
899	* src/diff.c (copyright_string): Likewise.
900	* src/diff3.c (copyright_string): Likewise.
901	* src/sdiff.c (copyright_string): Likewise.
902
903	* src/cmp.c (specify_ignore_initial): Renamed from
904	parse_ignore_initial, with different signature, to take the
905	maximum of multiple options rather than the last one.
906	All uses changed.
907
908	* src/cmp.c (bytes, specify_ignore_initial, cmp): Use UINTMAX_MAX
909	instead of (uintmax_t) -1, to avoid warnings on some compilers.
910	* src/io.c (file_block_read): Likewise, for SIZE_MAX.
911
912	* src/cmp.c (usage): Reformat messages to ease translation.
913	* src/diff3.c (usage): Likewise.
914	* src/sdiff.c (usage): Likewise.
915
916	* src/cmp.c (main): Two files with the same name are identical
917	only if the same offset is specified.
918	(block_compare_and_count): Avoid cast to unsigned char.
919
920	* src/diff3.c (main): Remove unused variable.
921
922	* src/dir.c: Include <setjmp.h>
923	(struct dirdata): New member nnames.
924	(locale_specific_sorting, failed_strcoll): New vars.
925	(dir_read): Renamed from dir_sort.  Don't sort the dir.
926	Set new nnames member of struct dirdata.  All callers changed.
927	(compare_names): Don't check for errno after strcasecmp.
928	Use strcoll only if locale_specific_sorting is nonzero.
929	If strcoll fails, longjmp out rather than returning a value
930	that might result in an invalid comparison function that might
931	make qsort dump core.
932	(diff_dirs): Sort the directory ourselves.  Use setjmp to recover
933	from strcoll failure, falling back on native byte comparison.
934	Make local variables volatile if they need to preserve their value
935	after setjmp/longjmp.
936
937	* src/sdiff.c (handler_index_of_SIGINT, handler_index_of_SIGPIPE):
938	New macros.
939	(main): Do not confuse signal numbers with their indices.
940	Bug reported by Bruno Haible.
941	(edit): Cat lin to long before printing with %ld, since lin might
942	be narrow than long.
943
944	* src/system.h (UINTMAX_MAX): New macro.
945	Include gettext.h, not libgettext.h.
946	(N_): Do not wrap arg in parentheses.  Fix from Bruno Haible.
947
948	* src/util.c (finish_output): Ensure that werrno is initialized.
949	(lines_differ): Have an explicit do-nothing case for
950	IGNORE_NO_WHITE_SPACE, to pacify gcc -Wall.
951
9522001-12-29  Eli Zaretskii  <eliz@is.elta.co.il>
953
954	* src/sdiff.c (interact): After extracting rlen from the editor
955	command, test for a terminating null character, not for a newline.
956
957	* ms/config.bat: Allow longer source directory names without
958	overflowing the line length limits.  Create the cache in the
959	build directory, not in the source directory
960	* ms/config.sed: Fix AC_CONFIG_LINKS for when symlinks are
961	unavailable.
962
9632001-12-23  Paul Eggert  <eggert@twinsun.com>
964
965	* NEWS, configure.ac (AM_INIT_AUTOMAKE): Version 2.7.6.
966
967	* configure.ac (ALL_LINGUAS): Add tr.
968
969	* src/util.c (begin_output):
970	Have child exit with status 127 rather than reporting
971	failure on its own.  Set errno to 0 before invoking popen.
972	(finish_output): Report errno on pclose failure.
973	Distinguish between subsidiary program not found, and failure.
974
975	* src/sdiff.c (not_found, execdiff): Remove.
976	(DIFF_PROGRAM_OPTION): New constant.
977	(longopts, option_help_msgid, main): Add --diff-program=PROGRAM.
978	(check_stdout): New function.
979	(main): Remove DIFF_PROGRAM.  Check stdout after printing version.
980	Use check_stdout after printing help.  Use execvp/perror_fatail rather
981	than execdiff.  Set errno to 0 before invoking popen.
982	Check for pclose failure properly.
983	(main, edit): If child exec fails, exit with 127 rather than trying to
984	print diagnostic.
985	Distinguish between subsidiary program failing and not being found.
986	(edit): Handle signals the same way, regardless of whether we're using
987	system or fork+exec.  Check for system returning -1.
988
989	* src/diff3.c (DIFF_PROGRAM_OPTION, HELP_OPTION): New constants.
990	(longopts, main): Use them.
991	(longopts, main, option_help_msgid): New option --diff-option=PROGRAM.
992	(main): Remove DIFF_PROGRAM support.
993	Check stdout after printing version.
994	(check_stdout): Report errno info if fclose fails.
995	(read_diff): Have child exit with status 127 when program is not found,
996	rather than trying to have the child report failure.  Check for
997	pclose returning -1.
998
999	* src/diff.c (DEFAULT_WIDTH): Remove.
1000	(main): Use 130 instead of DEFAULT_WIDTH, since it's not really
1001	builder-settable.  Do not prepend DIFF_OPTIONS.
1002	(check-stdout): If fclose (stdout) fails, print errno info.
1003	(option_help_msgid): Default context is 3, not 2.
1004	(usage): Work even if ptrdiff_t is wider than int.
1005
1006	* doc/diff.texi (diff Options): Remove DIFF_OPTIONS.
1007	(Invoking diff3, Invoking sdiff): Remove DIFF_PROGRAM.
1008	(diff3 Options, sdiff Options): Add --diff-program.
1009
1010	* src/cmp.c (valid_suffixes):
1011	Add '0', to support suffixes like "MB" and "MiB".
1012	(check_stdout): Don't assume that the translations of "write failed"
1013	and of "standard output" lack '%'.
1014	(main): Check stdout after printing version.
1015
1016	* lib/setmode.c: [HAVE_FCNTL_H && HAVE_SETMODE_DOS]: Include <fcntl.h>.
1017	[!HAVE_SETMODE_DOS]: Do not include <unistd.h>.
1018	(set_binary_mode): Return mode (not 1) if fd is a tty.
1019	Do not assume that O_TEXT is zero.
1020
1021	* doc/diff.texi (cmp Options):
1022	In byte counts, a plain suffix (without any integer)
1023	is assumed to modify the integer 1.  Index terms like "kibibyte".
1024	Document plain "k".
1025
1026	(Reporting Bugs): Mention bug-report archive and test version
1027	location.  Ask for "diff --version" in bug reports.
1028
10292001-12-13  Paul Eggert  <eggert@twinsun.com>
1030
1031	* src/diff.c (DEFAULT_WIDTH): Remove; couldn't be changed without
1032	also changing option_help_msgid.  All uses replaced with 130.
1033
1034	* lib/setmode.c: Include fcntl.h and unistd.h only if
1035	HAVE_SETMODE_DOS.
1036	(setmode): Assume a file is binary unless the mode is O_TEXT.
1037	* ms/README: Fix minor typos.
1038
10392001-12-13  Eli Zaretskii  <eliz@is.elta.co.il>
1040
1041	* ms/README: New file.
1042
1043	* lib/setmode.c (set_binary_mode) [HAVE_SETMODE_DOS]: Don't assume
1044	O_TEXT has a zero value.  If FD is a terminal device, do nothing
1045	and return MODE, thus pretending that it was already in the
1046	requested MODE.
1047	[HAVE_FCNTL_H]: Include fcntl.h (needed for O_BINARY).
1048
1049	* ms/config.sed: Remove the split prevention of config.status.
1050	Fix Sed commands for converting absolute file names into
1051	top_srcdir-relative ones.
1052
1053	* ms/config.bat: Fix typos.
1054
10552001-12-12  Neal H Walfield  <neal@cs.uml.edu>
1056
1057	* diff.c (option_help_msgid): Correct the default context width
1058	from 2 to 3.
1059
10602001-12-11  Paul Eggert  <eggert@twinsun.com>
1061
1062	* m4/Makefile.am.in: Remove jm-glibc-io.m4
1063
1064	* NEWS, configure.ac (AM_INIT_AUTOMAKE): Version 2.7.5.
1065
1066	* configure.ac (PR_PROGRAM): Use AC_DEFINE_UNQUOTED, so that
1067	$PR_PROGRAM is expanded by sh.
1068	(ptrdiff_t, ssize_t): Use AC_CHECK_TYPE with a default of int,
1069	not AC_CHECK_TYPES.
1070	(jm_AC_DOS, AC_FUNC_SETMODE_DOS): New macros.
1071	(AC_CONFIG_FILES): Add ms/Makefile.
1072
1073	* doc/diff.texi: Add --no-ignore-file-name-case.
1074	File name case sensitivity now affects file name exclusion.
1075	Fix typos.
1076
1077	* src/util.c: Include dirname.h.
1078	(dir_file_pathname): Use base_name rather than file_name_lastdirchar.
1079
1080	* src/system.h (S_IXUSR, S_IXGRP, S_IXOTH): New macros.
1081	Include <libgettext.h> rather than rolling it ourselves.
1082	(file_name_lastdirchar, HAVE_SETMODE, set_binary_mode): Remove.
1083
1084	* src/sdiff.c: Include <dirname.h>.
1085	(expand_name): Use base_name rather than file_name_lastdirchar, for
1086	portability to DOS.
1087	(main): Initialize xalloc_exit_failure before possibly invoking
1088	any memory allocator.
1089
1090	* src/io.c: Include setmode.h.
1091
1092	* src/diff3.c (main):
1093	Initialize xalloc_exit_failure before possibly invoking any memory
1094	allocator.
1095
1096	* src/diff.c: Include dirname.h, setmode.h.
1097
1098	(main): Later values and/or styles now silently override earlier.
1099	(specify_value, specify_style): Likewise.  All callers changed.
1100	Remove.
1101	(binary, main, option_help_msgid, compare_files):
1102	HAVE_SETMODE -> HAVE_SETMODE_DOS.
1103	(NO_IGNORE_FILE_NAME_CASE_OPTION): New constant.
1104	(longopts, main, option_help_msgid): Support it.
1105	(exclude_options): New function.
1106	(main): Use it. Initialize xalloc_exit_failure before potentially
1107	allocating memory.
1108
1109	(filetype): Distinguish executable files from others, as POSIX
1110	suggests.
1111
1112	(compare_files): Use base_name instead of file_name_lastdirchar.
1113
1114	* src/cmp.c: Include <hard-locale.h>, <setmode.h>.
1115	(hard_locale_LC_MESSAGES): New macro.
1116	(sprintc): Remove int width arg; it's now the caller's responsibility
1117	to pad.  All callers changed.
1118	(stat_buf): New static var; was formerly a local var in 'main'.
1119	(valid_suffixes): Add 'K', for 'KiB'.
1120	(option_help_msgid): Don't confuse bytes with characters.
1121	(main): Set xalloc_exit_failure before invoking anything that might
1122	allocate memory.  Fix bug: -n was incorrectly ignored when optimizing
1123	the case of regular files with different lengths.
1124	(cmp): Use an index column wide enough to store this comparison's
1125	indexes.  In locales other than the POSIX locale, say "byte"
1126	rather than "char".
1127
1128	* ms/config.bat: pc -> ms
1129
1130	* ms/Makefile.am, m4/setmode.m4, lib/setmode.c, lib/setmode.h:
1131	New file.
1132
1133	* lib/Makefile.am (noinst_HEADERS): Add dirname.h, setmode.h.
1134	(libdiffutils_a_SOURCES): Add basename.c, setmode.c.
1135
1136	* Makefile.am (SUBDIRS): Add ms.
1137
11382001-12-10  Paul Eggert  <eggert@twinsun.com>
1139
1140	* m4/fnmatch.m4: Test for FNM_CASEFOLD.
1141
11422001-12-03  Paul Eggert  <eggert@twinsun.com>
1143
1144	* lib/posix/regex.h: Fix copyright notice.
1145
11462001-12-03  Paul Eggert  <eggert@twinsun.com>
1147
1148	* NEWS, configure.ac (AM_INIT_AUTOMAKE): Version 2.7.4.
1149
1150	* diff.texi (direntry, Overview, Comparison, Binary, Invoking cmp):
1151	Use "byte" rather than "character" when talking about cmp, since
1152	it compares bytes, not character.
1153	(Invoking cmp): New trailing operands FROM-SKIP and TO-SKIP.
1154	-i or --ignore-initial now accepts FROM-SKIP:TO-SKIP.
1155	New option -n or --bytes.
1156	Count operands now may be in octal or hex, and may be followed by a
1157	size multiplier.
1158
1159	* configure.ac (DEFAULT_DIFF_PROGRAM):
1160	Define to "diff", not "$bindir/diff" (which didn't work anyway).
1161	(AC_CHECK_MEMBERS): Add struct stat.st_blksize, struct stat.st_rdev.
1162	(AC_STRUCT_ST_BLKSIZE, AC_STRUCT_ST_RDEV): Remove; obsolescent.
1163	(AC_FUNC_FORK): Use this, instead of obsolescent AC_FUNC_VFORK.
1164	(AC_CONFIG_FILES, AC_CONFIG_COMMANDS): Add.
1165	(AC_OUTPUT): Remove args; they were obsolescent.
1166
1167	* util.c (setup_output, begin_output, finish_output):
1168	HAVE_FORK -> HAVE_WORKING_FORK || HAVE_WORKING_VFORK.
1169	* sdiff.c (diffpid, cleanup, main, edit): Likewise.
1170	* diff3.c (read_diff): Likewise.
1171
1172	* system.h (STAT_BLOCKSIZE):
1173	Use HAVE_STRUCT_STAT_ST_BLKSIZE, not HAVE_ST_BLKSIZE.
1174	(vfork): New macro.
1175	(HAVE_FORK): Remove.
1176	(set_binary_mode): New macro.
1177
1178	* sdiff.c (main): HAVE_VFORK -> HAVE_WORKING_VFORK.
1179	(edit): Reopen the temporary file after the editor has run, in case
1180	the editor operates by unlinking the old file and linking a new one.
1181	(P_tmpdir): Rename from PVT_tmpdir; this fixes a typo.
1182	All uses changed.
1183
1184	* io.c (sip, read_files):
1185	Remove tests for HAVE_SETMODE; use set_binary_mode
1186	instead of setmode.
1187	(sip): Fix typo in backward lseek when reverting to text mode.
1188
1189	* config.site, config.sed, config.bat: New file.
1190
1191	* Makefile.am (EXTRA_DIST): Add xstrtol.c.
1192	(noinst_HEADERS): Add xstrtol.h.
1193	(libdiffutils_a_SOURCES): Add xstrtoumax.c.
1194
1195	* cmp.c: <xstrtol.h>: Include.
1196	(ignore_initial): Now an array with 2 elements.  All uses changed.
1197	(bytes): New var.
1198	(HELP_OPTION): New constant.
1199	(long_options, main): Use it.
1200	(long_options, option_help_msgid, main, cmp):
1201	Add support for -n or --bytes.
1202	(parse_ignore_initial): New function.
1203	(option_help_msgid, main): Add -i M:N.
1204	(usage, main): Add two optional trailing operands, a la BSD.
1205	(main): setmode -> set_binary_mode.
1206	(cmp): Report byte number of what we've seen, not of the entire file.
1207	This is to be consistent with the line number, which is always relative
1208	with what we've seen.
1209
12102001-12-02  Paul Eggert  <eggert@twinsun.com>
1211
1212	* diff.c (main, compare_files): setmode -> set_binary_mode.
1213
1214	* xstrtol.c (__xstrtol): Don't accept 'Ki'; require 'KiB'.
1215
1216	* xstrtol.c (__xstrtol): Add support for IEC 60027-2.
1217
12182001-11-25  Paul Eggert  <eggert@twinsun.com>
1219
1220	* NEWS, configure.ac (AM_INIT_AUTOMAKE): Version 2.7.3.
1221
1222	* README-alpha: New file.
1223
1224	* src/Makefile.am (INCLUDES): Add -I../lib, for regex.h.
1225
1226	* configure.ac:
1227	Don't set LIB_CLOCK_GETTIME to 'none required'; set it to
1228	the empty string instead.
1229
1230	* lib/Makefile.am (EXTRA_DIST): Add strtoimax.c, strtol.c.
1231
1232	* Makefile.am (SUBDIRS): Put intl before lib, so that libintl.h exists.
1233
1234	* lib/Makefile.am (noinst_HEADERS): Add unlocked-io.h.
1235
1236	* configure.ac (__EXTENSIONS__): New define, for the unlocked macros.
1237
1238	* README: Add copyright notice.
1239	Remove stuff that doesn't apply any more.
1240
1241	* doc/diff.texi: offsets -> indices for cmp
1242
1243	* src/cmp.c (option_help_msgid): offsets -> indices
1244
1245	* src/diff.c (option_help_msgid):
1246	Don't mention --binary on POSIX hosts.
1247
1248	* src/sdiff.c (STRIP_TRAILING_CR_OPTION): New constant.
1249	(longopts, option_help_msgid, main): Add -E, --ignore-tab-expansion,
1250	--strip-trailing-cr.
1251
1252	* doc/diff.texi: Change direcategory from Utilities to GNU Packages.
1253	Add individual utilities.
1254	Switch to Free Documentation License.
1255	@code -> @command
1256	@samp -> @option
1257	GNU -> @sc{gnu}
1258	Expand tabs to spaces, except when in an example that actually
1259	uses tabs.
1260	Prefer @node with just one arg.
1261	Document -E or --ignore-tab-expansion, --strip-trailing-cr,
1262	--ignore-file-name-case.
1263	Regular expressions are now grep style, not Emacs style.
1264	cmp's -c or --print-chars option is now -b or --print-bytes.
1265	Time stamps now depend on LC_TIME.
1266	-p now implies ^[[:alpha:]$_].
1267	Flags now include ' and 0.
1268	cmp -i is an alias for --ignore-initial
1269	Document --from-file, --to-file.
1270	Document DIFF_OPTIONS.
1271
1272	* configure.ac (AC_CHECK_FUNCS): Add gettimeofday, clock_gettime.
1273	(LIB_CLOCK_GETTIME): New subst.
1274
1275	* src/system.h: Assume C89 or better.
1276	(_GNU_SOURCE): Remove; config.h now defines it.
1277	(alloca): Declare like coreutils does it.
1278	(verify, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, O_RDWR,
1279	S_IRUSR, S_IWUSR): New macros.
1280	(STAT_BLOCKSIZE): Parenthesize definiens.
1281	<inttypes.h>: Include if HAVE_INTTYPES_H.
1282	(CHAR_MAX, INT_MAX): Remove.
1283	(PTRDIFF_MAX, SIZE_MAX): New macros.
1284	(strtoumax): New decl.
1285	Include stddef.h.
1286	(bzero): Remove.
1287	(bindtextdomain, textdomain, N_): New macros.
1288	(ISPRINT, ISSPACE): Remove ifndef wrappers.
1289	(ISUPPER, ISDIGIT): Remove.
1290	(TOLOWER): New macro.
1291	(MIN): Renamed from min; all callers changed.
1292	(MAX): Likewise, from max.
1293	(lin): New type.
1294	(LIN_MAX): New macro.
1295	(file_name_cmp): Renamed from filename_cmp.  All callers changed.
1296	(file_name_lastdirchar): Renamed from file_name_lastdirchar.
1297	All callers changed.
1298	(could_be_mvfs_stat_bug, could_be_nfs_stat_bug,
1299	dev_may_have_duplicate_ino): Remove.
1300	(HAVE_SETMODE, NULL_DEVICE): New macros.
1301	(same_file): Do not check attributes.
1302	(same_file_attributes): New macro.
1303
1304	* src/util.c: Assume C89 or better.
1305	int -> bool for booleans.
1306	int -> lin for line numbers.
1307	int -> size_t for sizes.
1308	Use angle-brackets when including quotesys.h.
1309	Include error.h, regex.h, xalloc.h.
1310	(message5): sizeof -> offsetof
1311	(begin_output): Invoke pr without -f.
1312	(lines_differ): Renamed from line_cmp, and return bool not 3-way int.
1313	All callers changed.
1314	Add support for IGNORE_TAB_EXPANSION.
1315	(change_letter): Now an array rather than a function.  All
1316	callers changed.
1317	(translate_range): Translate line numbers to long, not lin,
1318	for convenience with printf.
1319	(analyze_hunk): Return enum changes instead of a count of
1320	inserts and deletes.  All callers changed.
1321	(zalloc): New function.
1322
1323	* src/side.c: Assume C89 or better.
1324	int -> bool for booleans.
1325	int -> lin for line numbers.
1326
1327	* src/sdiff.c: Assume C89 or better.
1328	int -> bool for booleans.
1329	int -> lin for line numbers.
1330	Use angle-brackets when including getopt.h, quotesys.h.
1331	Include error.h, freesoft.h, stdio.h, xalloc.h.
1332	(copyright_string): Use only most recent year.
1333	(authorship_msgid, option_help_msgid): Wrap in N_().
1334
1335	(tmpname): Now volatile.
1336	(tmpmade): Remove.
1337	(tmp): New var.
1338	(private_tempnam, exists, letters): Remove.
1339	(temporary_file): New function.
1340	(edit): Use it.
1341	(interact): Use strtoumax, not atoi.
1342
1343	* src/normal.c: Assume C89 or better.
1344	int -> lin for line numbers.
1345
1346	* src/io.c: Assume C89 or better.
1347	int -> bool for booleans.
1348	int -> lin for line numbers.
1349	int -> size_t for sizes.
1350	Use angle-brackets when including cmpbuf.h.
1351	Include regex.h, xalloc.h.
1352	(word): Remove; now done in system.h.
1353	(hash_value): New type; use it instead of 'unsigned' for hash values.
1354	(file_block_read): New function.
1355	(sip, slurp): Use it.  Now static.
1356	(sip): Ensure block size is a multiple of word size.  Clear eof flag.
1357	(slurp): Use xalloc_die to report memory exhaustion.
1358	(find_and_hash_each_line): Use TOLOWER instead of _tolower.
1359	Add support for IGNORE_TAB_EXPANSION.
1360	(prepare_text_end): Strip trailing CR if requested.
1361	(find_identical_ends): Prepare the text only once,
1362	if they're duplicates.
1363	Let the compiler take advantage more of the fact that the buffers are
1364	word-aligned.
1365	(primes): Remove.
1366	(prime_offset): New var.
1367	(read_var): Use prime_offset instead of primes.
1368	Use zalloc instead of xmalloc + bzero.
1369
1370	* src/ifdef.c: Assume C89 or better.
1371	int -> lin for line numbers.
1372	(format_group): Use strtoumax to parse line numbers.
1373	(format_group, print_ifdef_lines): Use do_printf_spec to
1374	handle printf specs.
1375	(groups_letter_value): Don't use _tolower; it's locale-dependent.
1376	(do_printf_spec): Renamed from scan_printf_spec; now does the printing.
1377
1378	* src/ed.c: Assume C89 or better.
1379	int -> lin for line numbers (or 'long' when that's more convenient).
1380	(print_ed_hunk): Fix bug when handling double-dot inserts.
1381
1382	* src/dir.c: Assume C89 or better.
1383	int -> bool for booleans.
1384	Include error.h, exclude.h, xalloc.h.
1385
1386	(dir_sort): Return 0 on error, 1 on success.  All callers changed.
1387	compare_names -> compare_names_for_qsort.
1388
1389	(compare_names): Try strcasecmp if ignore_file_name_case.  Then try
1390	strcoll.  Use file_name_cmp only as a last resort.  Warn about
1391	strcasecmp or strcoll failure.
1392	(compare_names_for_qsort): New function.
1393
1394	(diff_dirs): Use compare_names rather than filename_cmp.
1395
1396	* src/diff3.c: Assume C89 or better.
1397	int -> bool for booleans.
1398	int -> lin for line numbers.
1399	Use angle-brackets when including getopt.h, quotesys.h.
1400	Include error.h, freesoft.h, inttostr.h, xalloc.h.
1401	(copyright_string): Use only most recent year.
1402	(authorship_msgid, option_help_msgid): Wrap in N_().
1403
1404	Rename the following variables for consistency with user-visible
1405	option spellings.  All uses changed.
1406	(text): Renamed from always_text.
1407	(initial_tab): Renamed from tab_align_flag.
1408
1409	(horizon_lines): Remove.  Remove all uses.
1410
1411	(main): Invoke bindtextdomain and textdomain after setlocale.
1412	Rename "DIFF" to "DIFF_PROGRAM".
1413
1414	Try to compare file0 to file1, because this is where changes are
1415	expected to come from.  Diffing between these pairs of files is more
1416	likely to avoid phantom changes from file0 to file1.
1417	However, use file2 as the common file if this is a 3-way diff,
1418	for backward compatibility.  Suggested by Karl Tomlinson.
1419
1420	(create_diff3_block): Use xcalloc instead of malloc + bzero.
1421
1422	(INT_STRLEN_BOUND): Remove; now in system.h.
1423
1424	(read_diff): Always use --horizon-lines=100 rather than trying
1425	to guess it.
1426	Do not pass --inhibit-hunk-merge.
1427	Minimum chunk size is 1, not 8KiB.
1428	Use xalloc_die to report memory exhaustion.
1429	(undotlines): Use long for start, not int.
1430
1431	* src/diff.h: Assume C89 or better.
1432	int -> bool for booleans.
1433	int -> lin for line numbers.
1434	Don't include regex.h.
1435	(enum changes): New enum.
1436	(enum line_class): Remove; subsumed by enum changes.
1437	(enum output_style): New constant OUTPUT_UNSPECIFIED.
1438
1439	(ignore_space_change_flag, ignore_all_space_flag): Remove.
1440	(ignore_white_space): New decl, subsuming the above two.  All
1441	uses changed.
1442
1443	Rename the following decls for consistency with user-visible
1444	option spellings.  All uses changed.
1445	(text): Renamed from always_text_flag.
1446	(ignore_blank_lines): Renamed from ignore_blank_lines_flag.
1447	(ignore_case): Renamed from ignore_case_flag.
1448	(brief): Renamed from no_details_flag.
1449	(initial_tab): Renamed from tab_align_flag.
1450	(expand_tabs): Renamed from tab_expand_flag.
1451	(starting_file): Renamed from dir_start_file.
1452	(paginate): Renamed from paginate_flag.
1453	(sdiff_merge_assist): Renamed from sdiff_help_sdiff.
1454	(left_column): Renamed from sdiff_left_only.
1455	(suppress_common_lines): Renamed from sdiff_skip_common_lines.
1456	(speed_large_files): Renamed from heuristic.
1457	(minimal): Renamed from no_discards.
1458
1459	(inhibit_hunk_merge): Remove.
1460
1461	(strip_trailing_cr, excluded, time_format): New decls.
1462
1463	(files_can_be_treated_as_binary): Renamed from ignore_some_changes.
1464
1465	(group_format, line_format): Now char const *[], not char *[].
1466
1467	(struct file_data): Buffer is now word*, not char*, as it's always
1468	aligned and this can help the compiler.  buffered_chars -> buffered
1469	(since it's a byte count, not a char count).  All uses changed.
1470	New member `eof'.
1471
1472	(FILE_BUFFER): New macro.
1473
1474	(excluded_filename, error, free_software_msgid): Remove decls; now in
1475	other .h files.
1476
1477	(sip, slurp): Remove decls.
1478	(file_block_read): New decl.
1479	(change_letter): Now an array, not a function.
1480	(lines_differ): Renamed from line_cmp.
1481	(analyze_hunk): Now returns enum changes rather than two change counts.
1482
1483	* src/Makefile.am (diff_LDADD): New symbol.
1484
1485	* src/diff.c: Assume C89 or better.
1486	int -> bool for booleans.
1487	long -> off_t for line numbers.
1488	Use angle-brackets when including getopt.h, fnmatch.h, quotesys.h.
1489	Include error.h, exclude.h, freesoft.h, hard-locale.h, prepargs.h,
1490	regex.h, signal.h, xalloc.h.
1491	(copyright_string): Use only most recent year.
1492	(authorship_msgid, option_help_msgid): Wrap in N_().
1493
1494	Rename the following variables for consistency with user-visible
1495	option spellings.  All uses changed.
1496	(binary): Renamed from binary_flag.
1497	(new_file): Renamed from entire_new_file_flag.
1498	(unidirectional_new_file): Renamed from unidirectional_new_file_flag.
1499	(report_identical_files): Renamed from print_file_same_flag.
1500
1501	(numeric_arg): Remove.
1502
1503	(exclude, exclude_alloc, exclude_count, excluded_filename, add_exclude,
1504	add_exclude_file):
1505	Remove; now done by exclude.h.
1506
1507	(BINARY_OPTION, FROM_FILE_OPTION, HELP_OPTION, HORIZON_LINES_OPTION,
1508	IGNORE_FILE_NAME_CASE_OPTION, INHIBIT_HUNK_MERGE_OPTION,
1509	LEFT_COLUMN_OPTION, LINE_FORMAT_OPTION, NORMAL_OPTION,
1510	SDIFF_MERGE_ASSIST_OPTION, STRIP_TRAILING_CR_OPTION,
1511	SUPPRESS_COMMON_LINES_OPTION, TO_FILE_OPTION,
1512	UNCHANGED_LINE_FORMAT_OPTION, OLD_LINE_FORMAT_OPTION,
1513	NEW_LINE_FORMAT_OPTION, UNCHANGED_GROUP_FORMAT_OPTION,
1514	OLD_GROUP_FORMAT_OPTION, NEW_GROUP_FORMAT_OPTION,
1515	CHANGED_GROUP_FORMAT_OPTION): New constants.
1516	(longopts, main): Use them.
1517
1518	(longopts, main, option_help_msgid): Add -E, --from-file, --to-file.
1519
1520	(main): Invoke bindtextdomain and textdomain after setlocale.
1521	Use grep syntax, not Emacs, for regular expressions.
1522	Use exclude.h, not our own functions.
1523	Use ISO 8601 time format in hard locales.
1524	Prepend DIFF_OPTIONS.
1525	Don't update ignore_some_changes.
1526	Use strtoumax instead of numeric_arg.
1527	Use specify_value when appropriate.
1528	error -> try_help when appropriate.
1529	-p now means ^[[:alpha:]$_], not ^[_a-zA-Z$].
1530	Ignore --inhibit-hunk-merge.
1531	Prefer changed group formats to unchanged ones.
1532	Remove now-unnecessary casts.
1533	Set files_can_be_treated_as_binary.
1534
1535	(specify_value): Renamed from specify_format.  All uses changed.
1536
1537	(specify_style): Default is now unspecified, not normal.  All
1538	uses changed.
1539
1540	(set_mtime_to_now): New function.
1541	(compare_files): Use it.  Use memset, not bzero.
1542	Set stdin mtime to current time even when stdin is not a regular file.
1543	Check for same file attributes, as well as for same file.
1544	Use files_can_be_treated_as_binary.
1545	"write failed" -> "standard output on output failure.
1546
1547	* src/context.c: Assume C89 or better.
1548	int -> lin for line numbers.
1549	Include inttostr.h, regex.h.
1550	(TIMESPEC_NS): New macro.
1551	(nstrftime): New decl.
1552	(print_context_label): Use nstrftime and time_format to format times.
1553	Print numeric time stamp value if localtime fails.
1554	(print_context_function): New function.
1555	(pr_context_hunk, pr_unidiff_hunk): Use it.
1556	(find_function): Use size_t for sizes, not int.
1557
1558	* src/cmp.c: Assume C89 or better.
1559	int -> bool for booleans.
1560	long -> off_t for line numbers.
1561	Use angle-brackets when including cmpbuf.h, getopt.h.
1562	Include error.h, freesoft.h, inttostr.h, xalloc.h.
1563	(copyright_string): Use only most recent year.
1564	(authorship_msgid): Wrap in N_().
1565	(buffer): Now word*, not char*.  All uses changed.
1566	(word): Remove macro; now in system.h.
1567	(long_options, option_help_msgid, main): -c --print-chars ->
1568	-b --print-bytes
1569	(check_stdout): "write failed" -> "standard output"
1570	(option_help_msgid): Wrap in N_().
1571	(main): Invoke bindtextdomain and textdomain after setlocale.
1572	Use strtoumax instead of doing the work ourselves.
1573	Check for same_file_attributes as well as same_file.
1574	(cmp): Use ssize_t for read returns, not size_t.
1575	Do not assume that size_t is not narrower than int.
1576	Do not assume that line numbers fit in 'long'.
1577	(block_compare_and_count, block_compare):
1578	Compiler now checks that buffers are word-aligned.
1579	(block_compare_and_count): Count sizes with size_t, not long.
1580	(sprintc): byte arg is unsigned char, not unsigned.
1581
1582	* src/analyze.c: Assume C89 or better.
1583	int -> lin for line numbers.
1584	int -> bool for booleans.
1585	unsigned int -> size_t for sizes.
1586	Use angle-brackets when including cmpbuf.h.
1587	Include error.h, regex.h, xalloc.h.
1588	(discard_confusing_lines, diff_2_files): Use zalloc rather
1589	than xalloc+bzero.
1590	(discard_confusing_lines): unsigned int -> lin for values that
1591	are really line numbers.
1592	(shift_boundaries): Do not inhibit hunk merges.
1593	(build_reverse_script, build_script, diff_2_files): Use |, not ||.
1594	(diff_2_files): no_details_flag & ~ignore_some_changes ->
1595	files_can_be_treated_as_binary.  Esure that buffer size is a multiple
1596	of sizeof (word).  Use file_block_read to read buffers.
1597	(diff_2_files): Abort if output style is not one of the
1598	expected styles.
1599
16002001-11-23  Paul Eggert  <eggert@twinsun.com>
1601
1602	* src/Makefile.am, m4/vararrays.m4: New file.
1603
1604	* m4/prereq.m4 (jm_PREREQ_READUTMP):
1605	Remove, as it gives autoheader the willies.
1606
1607	* m4/README, lib/prepargs.h, lib/prepargs.c, lib/offtostr.c,
1608	lib/umaxtostr.c, lib/inttostr.c, lib/inttostr.h,
1609	lib/imaxtostr.c, lib/freesoft.h: New files.
1610
1611	* lib/freesoft.c: Include config.h, freesoft.h rather than diff.h.
1612	(free_software_msgid): Wrap contents in N_.
1613
1614	* lib/cmpbuf.h: Use prototypes instead of old-style functions.
1615
1616	* lib/cmpbuf.c:
1617	Don't include system.h; instead, include config.h, unistd.h.
1618	Use prototypes instead of old-style functions.
1619	(block_read): Don't assume that int is no wider than size_t.
1620
1621	* lib/Makefile.am, po/POTFILES.in: New file.
1622
16232001-11-22  Paul Eggert  <eggert@twinsun.com>
1624
1625	* pc/config.h:
1626	Define filename_cmp as an object-like macro, not as a function-like
1627	macro.
1628
1629	* exgettext: Always operate in the C locale.
1630	Set AWK using a method that works even with broken shells.
1631
1632	* doc/Makefile.am: New file.
1633
1634	* configure.ac (AC_INIT):
1635	Use src/diff.c, not diff.h, as the source files got removed.
1636	(AM_CONFIG_HEADER): Switch from AC_CONFIG_HEADER.
1637	(AC_ARG_PROGRAM, AC_MINIX): Remove.
1638
1639	(AC_PREREQ, AM_INIT_AUTOMAKE, ALL_LINGUAS, AC_PROG_AWK,
1640	AM_PROG_CC_STDC, AC_PROG_RANLIB, AC_C_INLINE, AC_C_VARARRAYS,
1641	DEFAULT_DIFF_PROGRAM, DEFAULT_EDITOR_PROGRAM,
1642	AC_STRUCT_ST_MTIM_NSEC): Add.
1643
1644	(PR_PROGRAM): AC_DEFINE.
1645
1646	(AC_SYS_LARGEFILE): Use instead of our homebrew version.
1647
1648	(_GNU_SOURCE): Define if not defined.
1649
1650	(AC_CHECK_HEADERS): Add stdbool.h, unistd.h.
1651	(AC_CHECK_TYPES): Add ptrdiff_t, uintmax_t.
1652	(AM_GNU_GETTEXT, XGETTEXT): Add.
1653
1654	(WITH_MVFS_STAT_BUG, WITH_NFS_STAT_BUG): Remove.
1655	(HAVE_MEMCHR): Remove.
1656	(AC_CHECK_FUNCS): Add diraccess.
1657	(AC_REPLACE_FUNCS): Add memchr, waitpid.
1658	(jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_GNU_STRFTIME, jm_FUNC_MALLOC,
1659	 jm_FUNC_REALLOC, jm_PREREQ_ERROR, jm_PREREQ_QUOTEARG, jm_PREREQ_REGEX,
1660	 jm_PREREQ_TEMPNAME, jm_AC_PREREQ_XSTRTOUMAX, AC_FUNC_FNMATCH): Add.
1661	(fnmatch.h, regex.h): Do not create these files unless we're using
1662	our own fnmatch and regex.
1663
1664	(AC_OUTPUT): Add doc/Makefile, intl/Makefile, lib/Makefile,
1665	lib/posix/Makefile, m4/Makefile, po/Makefile.in, src/Makefile.
1666
1667	* Makefile.am: New file.
1668
1669	* po/en_GB.po: Don't translate "program" to "programme".
1670
16712001-11-20  Paul Eggert  <eggert@twinsun.com>
1672
1673	* m4/prereq.m4: New file.
1674
16752001-03-16  Paul Eggert  <eggert@twinsun.com>
1676
1677	* lib/tempname.c (uint64_t):
1678	Define if not defined, and if UINT64_MAX is not defined.
1679
16802001-02-26  Paul Eggert  <eggert@twinsun.com>
1681
1682	* lib/tempname.c: glibc 1.32
1683
16842001-02-17  Paul Eggert  <eggert@twinsun.com>
1685
1686	* m4/Makefile.am.in: GNU fileutils 4.1
1687
16882001-01-09  Paul Eggert  <eggert@twinsun.com>
1689
1690	* lib/tempname.c (struct_stat64): New macro.
1691	(direxists, __gen_tempname): Use it.  This avoids a portability problem
1692	with Solaris 8.
1693
1694	* lib/tempname.c (<config.h>): Include if HAVE_CONFIG_H.
1695	(<stddef.h>, <stdint.h>, <string.h>):
1696	Include only if STDC_HEADERS || _LIBC.
1697	(<fcntl.h>): Include only if HAVE_FCNTL_H || _LIBC.
1698	(<unistd.h>): Include only if HAVE_UNISTD_H || _LIBC.
1699	(<sys/time.h>): Include only if HAVE_SYS_TIME_H || _LIBC.
1700	(__set_errno): Define this macro if <errno.h> doesn't.
1701	(P_tmpdir, TMP_MAX, __GT_FILE, __GT_BIGFILE, __GT_DIR, __GT_NOCREATE):
1702	Define these macros if <stdio.h> doesn't.
1703	(S_ISDIR, S_IRUSR, S_IWUSR, S_IXUSR):
1704	Define these macros if <sys/stat.h>
1705	doesn't.  Ignore <sys/stat.h> S_ISDIR if STAT_MACROS_BROKEN.
1706	(stat64, __getpid, __gettimeofday, __mkdir, __open, __open64, lxstat64,
1707	__xstat64): Define if not _LIBC.
1708	(__secure_getenv): Define if ! (HAVE___SECURE_GETENV || _LIBC).
1709	(__gen_tempname): Invoke gettimeofday only if HAVE_GETTIMEOFDAY
1710	|| _LIBC; otherwise, fall back on plain "time".
1711	Use macros like S_IRUSR | S_IWUSR rather than octal values like 0600.
1712
1713	* lib/mkstemp.c (__GT_FILE): Define to zero if not defined.
1714
17152000-10-25  Paul Eggert  <eggert@twinsun.com>
1716
1717	* lib/hard-locale.c: New file.
1718
17192000-02-05  Paul Eggert  <eggert@twinsun.com>
1720
1721	* exgettext: From GCC repository
1722
17231999-07-06  Paul Eggert  <eggert@twinsun.com>
1724
1725	* lib/mkstemp.c: glibc 2.2
1726
17271998-12-11  Paul Eggert  <eggert@twinsun.com>
1728
1729	* src/sdiff.c (lf_snarf):
1730	Fix bug when help line wrapped around the input buffer.
1731
17321998-09-15  Paul Eggert  <eggert@twinsun.com>
1733
1734	* diff.texi: Add @dircategory and @direntry.
1735
17361998-09-14  Paul Eggert  <eggert@twinsun.com>
1737
1738	* Makefile.in (VERSION): Version 2.7.2.
1739	(DEFAULT_DIFF_PROGRAM): Renamed from DIFF_PROGRAM.
1740	(PR_PROGRAM): All `configure' to define it.
1741	(srcs): Add $(diffutils_srcs), freesoft.c, quotearg.c instead of
1742	quote.c, quotearg.h.
1743	(distfiles): Add acconfig.h, message/*.
1744	(all): Depend on $(destfiles), not info.
1745	(version.c): Parenthesize `GNU diffutils'.
1746	(common_o): Add freesoft.o
1747	(diff_o): quote.o -> quotearg.o
1748	(diff3_o, sdiff_o): Likewise.
1749	(diff.dvi): Depend on version.texi.
1750	(diff.o diff3.o quotearg.o sdiff.o util.o):
1751	New dependency on quotearg.h
1752	(diff3.o): DIFF_PROGRAM -> DEFAULT_DIFF_PROGRAM.
1753	(sdiff.o): Likewise.
1754	(messages.po): Remove.
1755	(message/msgid.po, message/template.po): New rules.
1756	(maintainer-clean): Renamed from realclean.
1757	(install): Install from source directory, if applicable.
1758	Invoke install-info if needed.
1759	(install-strip): New rule.
1760	(check): Set DIFF.
1761	(stamp-h.in): Don't put the date into the timestamp.
1762	(D_dirs): Add $D/message.
1763	($D.tar.gz): Compress with gzip -9.
1764	Don't use ln to create distribution; it doesn't work with symlinks.
1765	(srcs, distfiles, diff_o, diff3_o, sdiff_o): Rename quotearg.c to
1766	quotesys.c and quotearg.h to quotesys.h.
1767
1768	* configure.in (AC_PATH_PROG): Add PR_PROGRAM.
1769	If available, prefer support for large files unless the user specified
1770	one of the CPPFLAGS, LDFLAGS, or LIBS variables.
1771	(AC_STRUCT_ST_RDEV): Add.
1772	(HAVE_ST_FSTYPE_STRING): Add.
1773	(--with-mvfs-stat-bug, --with-nfs-stat-bug): New options.
1774	(HAVE_MEMCHR): New macro.
1775	(AC_CHECK_FUNCS): Add sicprocmask.
1776
1777	* diff.h (XTERN): Renamed from EXTERN.
1778	(struct filedata): Remove dir_p arg.
1779	(struct comparison): New type.
1780	(diff_2_files, diff_dirs)" Ise ot/
1781	(error): Add printf attribute if applicable.
1782	(free_software_msgid): New decl.
1783	(pr_program): New decl.
1784	(fatal): Add noreturn attribute.
1785	(pfatal_with_name): Likewise.
1786
1787	* system.h (__attribute__): New macro.
1788	(getenv): Don't declare if HAVE_STDLIB_H.
1789	(CHAR_MAX): New macro.
1790	(<locale.h>): New include.
1791	(<locale.h>): Include before <libintl.h>.
1792	(could_be_mvfs_stat_bug, could_be_nfs_stat_bug,
1793	dev_may_have_duplicate_ino, same_special_file): New macros.
1794	(same_file): Use them.
1795
1796	* cmp.c (authorship_msgid): New var.
1797	(free_software_msgid): New decl.
1798	(error): Now has printf attribute.
1799	(try_help): Likewise.
1800	(long_options): Don't assume ASCII.
1801	(try_help): Now accepts operand arg.
1802	(main): Check for -1, not EOF, when calling getopt_long.
1803	Report --ignore-initial value when complaining about it.
1804	Output copyright and free software info with -v.
1805	Don't assume ASCII.
1806	Report last operand when one is missing.
1807	Report text of extra operand.
1808	Move block_read into cmpbuf.c.
1809
1810	* diff.c (authorship_msgid): New var.
1811	(quotesys.h): Include.
1812	(ck_atoi): Remove.
1813	(function_regexp_list, ignore_regexp_list): Now static.
1814	(binary_flag): Renamed from binary_I_O.
1815	(entire_new_file_flag, unidirectional_new_file_flag,
1816	print_file_same_flag): Now static.
1817	(numeric_arg): Renamed from ck_atoi.
1818	New argument specifying the argument type.
1819	(longopts, main): Don't assume ASCII.
1820	(longopts): Remove old aliases --file-label, --entire-new-file,
1821	--ascii, --print.
1822	(main): Check for -1, not EOF, when calling getopt_long.
1823	Use numeric_arg to report errors.
1824	Report error if -l specified but pagination is not supported.
1825	Report error if -S is specified twice with conflicting values.
1826	Have --version conform to the new GNU standards.
1827	Add new --from-file, --to-file, --inhibit-hun,-merge options.
1828	Make the horizon at least as large as the context.
1829	Add casts to pacify gcc -Wall.
1830	(try_help): Add operand arg.
1831	(option_help_msgid): Doc fix to match above.
1832	(usage): Indent option_help_msgid.
1833	(compare_files): Now takes struct comparison
1834	instead of two directory names and a depth.
1835	(NONEXISTENT, UNOPENED, ERRNO_ENCODE, ERRNO_DECODE):
1836	New macros.
1837	(DIR_P): New macro.
1838	Report error if fflush does.
1839
1840	* cmpbuf.c (block_read): Moved here from cmp.c.
1841
1842	* cmpbuf.h (block_read): New decl.
1843
1844	* io.c (cmpbuf.h): Include.
1845	(slurp): Check for arithmetic overflow when computing buffer size.
1846
1847	* dir.c (diff_dirs): Check for recursive directory loop.
1848	Arg is now struct comparison const *.
1849	(dir_loop): New function
1850
1851	* analyze.c (no_discards): Remove.
1852	(inhibit): Remove.
1853	(shift_boundaries): Don't inhibit.  If inhibit_hunk_merge is nonzero,
1854	don't merge hunks.
1855	(briefly_report): Now returns 2 if trouble, CHANGES otherwise.
1856	(diff_2_files): Now takes struct comparison.  If briefly_report reports
1857	trouble, pass it on to caller.
1858
1859	* side.c (print_half_line): Add brackets to pacify GCC -Wall.
1860
1861	* sdiff.c (quotesys.h): Include.
1862	(DIFF_PROGRAM, DEFAULT_EDITOR_PROGRAM): Remove.
1863	(free_software_msgid, editor_program, not_found): New vars.
1864	(diffbin, edbin): Remove.
1865	(editor_program): Renamed from edbin.
1866	(edit, interact): Now take extra string arg.
1867	(exiterr, fatal, perror_fatal, try_help): Add noreturn attribute.
1868	(sigset_t, sigemptyset, sigmask, sigaddset, SIG_BLOCK, SIG_SETMASK):
1869	(sigprocmask): New macros, if !HAVE_SIGPROCMASK.
1870	(error): Now has printf attribute.
1871	(longopts, main): Don't assume ASCII.
1872	(try_help): New operand arg.
1873	(usage): Conform to new GNU standards.
1874	(main): Set static vars for editor and diff program.
1875	Compare getopt_long result to -1, not EOF.
1876	-v conforms to new GNU standard.
1877	Complain better about extra and missing operands.
1878	If HAVE_VFORK, block SIGINT and SIGPIPE in the parent, since when
1879	the child munges its handlers it may somp on the parent.
1880	Pass rname to intract.
1881	Translate not-found message before forking.
1882	(give_help): Just output it all at once.
1883	(edit): New args lname, lline, rname, rline.
1884	(edit): New command 'd'.
1885	(interact): New args lname, rname.
1886
1887	* util.c (quotesys.h): Include.
1888	(PR_PROGRAM): New macro.
1889	(pfatal_with_name): Abort if error returns.
1890	(fatal): Likewise.
1891	(print_message_queue): Free message chain after printing.
1892	(currently_recursive): Renamed from current_depth, and now a boolean.
1893	(begin_output): Report error if fflush does.
1894	Avoid stdio and gettext in child.
1895
1896	* diff3.c (quotesys.h): Include.
1897	(free_software_msgid): New decl.
1898	(RANGE_START, RANGE_END): Renamed from START and END.
1899	(fatal, perror_with_exit, try_help): Add noreturn attribute.
1900	(error): Add printf attribute.
1901	(diff_program): Now a ptr, not an array.
1902	Initialize to DEFAULT_DIFF_PROGRAM instead of DIFF_PROGRAM.
1903	(longopts, main): Don't assume ASCII.
1904	(main): Use DIFF environment var to specify name of diff program.
1905	Compare getopt_long result to -1, not EOF.
1906	-v now reports version according to new GNU standard.
1907	Report spelling of extra operand, or last operand before missing one.
1908	(try_help): Now takes operand arg.
1909	(option_help_ms): Fix typo: missing comma.
1910	(usage): Update as per current GNU standards.
1911	(environ): Remove decl.
1912	(read_diff): Invoke diff with --inhibit-hunk-merge.
1913	Translate `not found' message before forking.
1914	Quote name of diff program.
1915	Pass horizon lines.
1916	`memory exhausted' -> `Memory exhausted'
1917
1918	* pc/makefile (%.exe): Remove.
1919	(pc-clean): Remove *.exe
1920	* pc/makefile.sed (DEFAULT_DIFF_PROGRAM): Renamed from DIFF_PROGRAM.
1921	When editing mkinstalldirs rule, look for exec_prefix and prefix.
1922	Add .exe when installing files.
1923	* pc/emx/config.h (same_file): Add.
1924	* pc/config.h (same_file): Remove.
1925	* pc/djgpp/config.h: Adjust to latest patch from eliz.
1926	* pc/djgpp/makefile.sed: Don't alter PROGRAMS.
1927	* pc/pc.c: Update FSF address.
1928	(quote_system_arg): Renamed from system_quote_arg.
1929
1930	* README: Add --with-mvfs-stat-bug, --with-nfs-stat-bug.
1931
1932	* getmsgids: Add copyright date and update FSF address.
1933
1934	* diff.texi: Document recent changes.
1935	The patch doc still corresponds to patch 2.2, unfortunately.
1936	Update GNU bug reporting address.  Omit Larry Wall's address;
1937	it's obsolete and he's busy with perl.
1938
1939	* context.c: Fix spacing.
1940
1941	* NEWS: Mention --from-file=FILE, --to-file=FILE, ed.
1942
1943	* acconfig.h, freesoft.c, message/de.po, message/en_UK.po,
1944	message/es.po, message/fr.po, message/pl.po, message/sv.po:
1945	New files.
1946
1947	* ed.c: Remove `#if 0'ed code.
1948
1949	* normal.c, waitpid.c: Update FSF address.
1950
19511998-03-15  Paul Eggert  <eggert@twinsun.com>
1952
1953	* quotesys.c: Renamed from quotearg.c.
1954
1955	* quotesys.h: Renamed from quotearg.h
1956	(__QUOTESYS_P): Renamed from __QUOTEARG_P.
1957
19581997-05-05  Paul Eggert  <eggert@twinsun.com>
1959
1960	* quotesys.c, quotesys.h: New file.
1961
1962Mon Nov 14 05:10:56 1994  Paul Eggert  <eggert@twinsun.com>
1963
1964	Add internationalization support.
1965	Several messages have been changed slightly,
1966	to make them more consistent and easier to translate.
1967	All strings that are messages are passed through gettext once before
1968	being used, so that they can be localized.
1969	Each function and macro whose first parameter is a gettext msgid
1970	has had its first parameter's name changed so it ends in `msgid'.
1971	All arrays of msgids have had their names changed to end in `msgid'.
1972	`getmsgids' uses this to determine which strings are msgids.
1973
1974	* pc/COPYING, pc/INSTALL, pc/config.h,
1975	pc/djgpp/config.h, pc/djgpp/makefile.sed,
1976	pc/emx/config.h, pc/emx/diff.def, pc/emx/gnuregex.def,
1977	pc/emx/makefile.sed,
1978	pc/makefile, pc/makefile.sed, pc/pc.c: New files, for PC support.
1979
1980	* getmsgids: New file.
1981
1982	* Makefile.in (PACKAGE, VERSION, diffutils_srcs, D): New vars.
1983	(version.c, version.texi, messages.po): New files.
1984	messages.po is built automatically from source files and `getmsgids'.
1985	(distfiles): Add them, pc/*, and getmsgids.
1986	(diff.info): Now depends on version.texi.
1987	(realclean): Clean messages.po, version.*.
1988	(dist): Just build $D.tar.gz.
1989	($D.tar.gz): New file, takes over old `dist' function.
1990	Don't assume $(distfiles) are all in same directory.
1991
1992	* configure.in (AC_CHECK_HEADERS): Add libintl.h, locale.h.
1993	(AC_CHECK_LIB): Check for -lintl.
1994
1995	* analyze.c (briefly_report): Rewrite `message (A?"B":"C")' as
1996	`if (A) message ("B") : message ("C")'; this is for getmsgids.
1997	(briefly_report, diff_2_files): For label, use file_label if set.
1998	* diff.c (compare_files): Likewise.
1999
2000	* system.h (gettext): Declare; use a stub if ! HAVE_LIBINTL_H.
2001	(setlocale): Declare; use a stub if ! HAVE_LOCALE_H.
2002
2003	* cmp.c, diff.c, diff3.c, sdiff.c (main):
2004	Invoke setlocale first thing, to tell library we're internationalized.
2005	(option_help_msgid): New constant.
2006	(usage): Use it, so message is translated one option at a time.
2007	* sdiff (help_msgid, give_help): Likewise.
2008
2009	* cmp.c (sprintc): Renamed from `printc'.
2010	Now outputs to a buffer instead of stdout.
2011	(cmp): Use new sprintc; it's easier to internationalize.
2012
2013	* diff.c (main): -D FOO now outputs `/* ! FOO */ instead of
2014	`/* not FOO */'.
2015
2016	* sdiff.c (version_string): Fix decl typo: `const' was missing.
2017	(trapsigs): Ignore sigaction failure, to be compatible with `signal'.
2018
2019	* util.c (struct msg, message5, print_message_queue):
2020	Allocate just one block of memory to save a message.
2021
2022Wed Nov  9 17:42:44 1994  Paul Eggert  <eggert@twinsun.com>
2023
2024	* sdiff.c (trapsigs): Don't check signal return value, since it's
2025	bogus under djgpp.
2026
2027Mon Oct 31 07:27:27 1994  Paul Eggert  <eggert@twinsun.com>
2028
2029	* Makefile.in (srcs, diff_o, diff3_o, sdiff_o):
2030	New files quote.c, quote.o.
2031
2032	* diff.h (function_regexp, ignore_regexp): Replace lists of compiled
2033	regexps with these single compiled regexps.  All users changed.
2034	(regexp_list,function_regexp_list,ignore_regexp_list): Move to diff.c.
2035	* diff.c (add_regexp): Build one big regexp instead of a regexp list.
2036	(summarize_regexp_list): New function.
2037	(regexp_list): Redesigned struct; moved here from diff.h.
2038	(function_regexp_list, ignore_regexp_list): Likewise, for vars.
2039
2040	* context.c (find_function): Simplify interface:
2041	don't return size of function line.  All callers changed.
2042	(print_context_script, find_function): INT_MAX now denotes no
2043	previous match; this is simpler than `- file->prefix_lines - 1'.
2044
2045	* diff3.c (read_diff): Quote arguments with system_quote_arg.
2046	* sdiff.c (main): Use system_quote_arg to compute command.
2047	* diff.c (option_list): Quote options with system_quote_arg.
2048	* util.c (begin_output): Use system_quote_arg to compute command.
2049
2050	* util.c (pr_program): New var.
2051	(analyze_hunk): Fix off-by-1 line length bug.
2052	Match with one big regexp instead of a list of regexps.
2053	Use new `trivial_length' local instead of comparing first byte to `\n'.
2054	Help the compiler with linbuf local vars.
2055
2056	* system.h (system_quote_arg):
2057	New function; replaces SYSTEM_QUOTE_ARG macro.
2058
2059Sat Oct 15 20:09:12 1994  Paul Eggert  <eggert@twinsun.com>
2060
2061	* system.h (_tolower): Define if not already defined.
2062	* io.c (find_and_hash_each_line): Change tolower to _tolower; this
2063	speeds up diff -i considerably on some hosts (e.g. Solaris 2.3).
2064	* util.c (line_cmp): Likewise.
2065	* ifdef.c (groups_letter_value): Likewise.
2066
2067	* diff.h (ignore_some_line_changes): Remove.  All users changed.
2068	* io.c (find_and_hash_each_line): Don't invoke line_cmp if the length
2069	differs and -i is in force.  Don't assume ISSPACE ('\n') is nonzero.
2070
2071	* diff.h (xmalloc_exit_failure): New variable.
2072	All `main' programs set this variable at the start.
2073	xmalloc and xrealloc are now taken from GNU library.
2074	* cmp.c (main): Align buffer size to word size; some mallocs care.
2075	* io.c (slurp): Likewise.
2076	* diff.c (add_exclude): Can now assume xrealloc (0, ...) works.
2077	(add_regexp): Free storage on failure.  Allocate storage all at one go.
2078	* system.h (malloc, realloc): Remove unused declarations.
2079	* diff3.c, sdiff.c, util.c (xmalloc, xrealloc): Remove.
2080	* sdiff.c (diffarg): Take advantage of cleaner xrealloc semantics.
2081
2082	* io.c (ROL): Use sizeof to make it more generic.
2083
2084	* Makefile.in (common_o): New variable.
2085	Link error.o and xmalloc.o into all programs.
2086	(check): Depend on $(PROGRAMS).
2087
2088	* diff.h (error): Change to GNU library standard.  All callers changed.
2089	* diff3.c (main): Use strerror (EISDIR) instead of "Is a directory".
2090	(fatal, perror_with_exit): Use `error'.
2091	* util.c (perror_with_name, fatal): Use GNU `error'.
2092	(error): Remove.
2093
2094Wed Oct 12 17:04:40 1994  David J. MacKenzie  (djm@duality.gnu.ai.mit.edu)
2095
2096	* cmp.c (main): Set xmalloc_exit_failure.
2097
2098Sat Oct  1 05:24:19 1994  Paul Eggert  <eggert@twinsun.com>
2099
2100	* Version 2.7 released.
2101
2102	* configure.in (AC_HEADER_SYS_WAIT): Add.
2103	(AC_CHECK_HEADERS): Remove sys/wait.h.
2104	(AC_CHECK_FUNCS): Add tmpnam.
2105	* system.h (<sys/wait.h>, WEXITSTATUS): Use simpler scheme
2106	now that HAVE_SYS_WAIT_H is not set on hosts
2107	that are incompatible with Posix applications.
2108
2109	* util.c (dir_file_pathname): Use filename_lastdirchar not strrchr.
2110	* sdiff.c (expand_name): Likewise.
2111	(private_tempnam): Use tmpnam if HAVE_TMPNAM; this simplifies porting.
2112	(exists, letters): Omit if HAVE_TMPNAM.
2113
2114	* diff3.c (read_diff): If STAT_BLOCKSIZE yields zero,
2115	adjust it to a more reasonable value.
2116
2117Sat Sep 24 20:36:40 1994  Paul Eggert  <eggert@twinsun.com>
2118
2119	* sdiff.c (exists, private_tempname): Adopt latest GNU libc algorithm.
2120	(private_tempnam): Specialize for sdiff to avoid portability problems.
2121
2122Thu Sep 22 16:47:00 1994  Paul Eggert  <eggert@twinsun.com>
2123
2124	* configure.in (AC_ARG_PROGRAM): Added.
2125	(AC_OUTPUT): Add [date > stamp-h].
2126
2127	* Makefile.in (DEFAULT_EDITOR_PROGRAM, DIFF_PROGRAM, LIBOBJS,
2128	NULL_DEVICE, PR_PROGRAM, PROGRAMS): New variables.
2129	(check, stamp-h.in, cmp.o, util.o): New targets.
2130	(edit_program_name): New variable; replaces old binprefix method.
2131	(install, uninstall): Use it.
2132	(binprefix): Removed.
2133	(distfiles): Add stamp-h.in.
2134	(clean): Clean stamp-h.
2135	(config.hin, config.h): Use time stamp files.
2136	(cmp_o): Add $(LIBOBJS).
2137	(install): Install info files from srcdir if they're not in `.'.
2138
2139	* cmp.c, io.c (word): Don't define if already defined.
2140
2141	* comp.c (main): Use setmode, not open(..., O_BINARY); this gets stdin.
2142	Use NULL_DEVICE instead of "/dev/null".
2143	(cmp): Use %lu instead of %ld when it is more likely to be right.
2144
2145	* diff.h (PR_FILE_NAME): Rename to PR_PROGRAM and move to Makefile.in,
2146	util.c.
2147
2148	* diff3.c (main): Give proper diagnostic if too many labels were given.
2149	(read_diff): Use SYSTEM_QUOTE_ARG.
2150
2151	* system.h: <string.h>: Include if HAVE_STRING_H, too.
2152	<ctype.h>: Include here.  All includers changed.
2153	(CTYPE_DOMAIN, ISDIGIT, ISPRINT, ISSPACE, ISUPPER): New macros that
2154	work around common <ctype.h> problems.
2155	(O_BINARY): Remove.
2156	(SYSTEM_QUOTE_ARG): New macros.
2157
2158	* diff.c: Add comment.
2159
2160	* util.c (PR_PROGRAM): Moved here from diff.h.
2161	(begin_output): Use SYSTEM_QUOTE_ARG.
2162
2163	* io.c (read_files): Set mode to binary before returning 1.
2164
2165	* sdiff.c (TMPDIR_ENV): New macro.
2166	(DEFAULT_EDITOR_PROGRAM): Renamed from DEFAULT_EDITOR for consistency.
2167	(expand_name): Change `isdir' to `is_dir' to avoid theoretical ctype
2168	namespace contamination.
2169	(main): Use SYSTEM_QUOTE_ARG.
2170	(private_tempnam): Don't access "/tmp" directly; use PVT_tmpdir.
2171
2172Tue Sep 13 18:46:43 1994  Paul Eggert  <eggert@twinsun.com>
2173
2174	* configure.in (AC_FUNC_MEMCHR): Remove.  Autoconf didn't adopt this,
2175	since we need not worry about an old experimental library
2176	where memchr didn't work.
2177	(AC_FUNC_MEMCMP): Not needed, since we only test for equality.
2178	(AC_REPLACE_FUNCS): Add test for memchr.
2179	(AC_CHECK_FUNCS): Check for memchr, not memcpy, since it'll be cached.
2180	(AC_CHECK_HEADERS): Add string.h; regex.c uses on some old hosts.
2181
2182	* system.h (memcmp): Define in terms of bcmp.
2183	Use HAVE_MEMCHR to test for all mem* routines.
2184
2185	* Makefile.in (srcs): Remove memcmp.c.
2186	We use bcmp if memcmp doesn't work, since we only test for equality.
2187
2188Mon Sep 12 15:52:22 1994  Paul Eggert  <eggert@twinsun.com>
2189
2190	* configure.in (AC_CONFIG_HEADER): Rename config.h.in to config.hin.
2191	(AC_ISC_POSIX, AC_MINIX): Go back to these old names for Autoconf 2.
2192	(AC_CHECK_HEADERS): Remove now-redundant check for <string.h>.
2193	(AC_CHECK_FUNCS): Check for strchr.
2194	(AC_FUNC_MEMCHR, AC_FUNC_MEMCMP, AC_CHECK_FUNCS): Use special-purpose
2195	macros when suitable.
2196	* memcmp.c: New file.
2197	* Makefile.in (CPPFLAGS, DEFS, CFLAGS, LDFLAGS, prefix, exec_prefix):
2198	Default to autoconf-specified strings.
2199	(COMPILE): Use the defaults.
2200	(srcs): Add memcmp.c.
2201	(distfiles): Rename config.h.in->config.hin, install.sh->install-sh.
2202	(Makefile, config.h, config.hin, config.status): Rework for
2203	compatibility with Autoconf 2.
2204	* io.c (binary_file_p): Assume non-broken memchr.
2205	* memchr.c: Assume compiler understands void *; otherwise
2206	we don't match GCC's internal declaration of memchr.
2207	* system.h: Use more modern autoconf approach to standard C headers.
2208	* version.c: Include <config.h>, not "config.h".
2209
2210	* diff.c, diff.h (ignore_some_line_changes):
2211	New variable; replaces `length_varies'.
2212	(line_end_char): Replace with '\n'; it wasn't being used consistently.
2213
2214	* io.c (find_and_hash_each_line): Fix inconsistencies with -b -w -i and
2215	incomplete lines.  Put incomplete lines into their own bucket.
2216	This means line_cmp no longer needs line length arguments,
2217	and equivalence classes' line lengths no longer need to include \n.
2218	Invoke line_cmp only if ignore_some_line_changes.
2219	(prepare_text_end): -B no longer ignores missing newlines.
2220	(read_files): Allocate another bucket for incomplete lines.
2221
2222	* util.c (line_cmp): Now takes just two arguments.  No longer
2223	optimizes for common case of exact equality; the caller does that
2224	optimization now.  The caller is changed accordingly.
2225	Optimize for the common case of mostly equality.
2226	Use isupper+tolower instead of islower+toupper, for consistency.
2227
2228	* waitpid.c (waitpid): Fix typo with internal scoping.
2229
2230Thu Sep  8 08:23:15 1994  Paul Eggert  <eggert@twinsun.com>
2231
2232	* configure.in: Revamp for Autoconf 2.
2233	* memchr.c, waitpid.c: New source files for substitute functions.
2234	* Makefile.in (diff_o, diff3_o, sdiff_o): Add $(LIBOBJS).
2235	(srcs): Add memchr.c, waitpid.c.
2236	(distfiles): Add install.sh, memchr.c, waitpid.c, install.sh.
2237	* system.h: Use Autoconf 2 style HAVE_DIRENT_H etc. macros for dirs.
2238	* dir.c (dir_sort): Prefer NAMLEN (p) to strlen (p->d_name).
2239	Change VOID_CLOSEDIR to CLOSEDIR_VOID for Autoconf 2.
2240	* sdiff.c, util.c (memchr, waitpid): Remove; use new substitutes.
2241	* diff3.c (read_diff): Use new waitpid substitute.
2242
2243	* cmp.c, diff.c, diff3.c, sdiff.c (check_stdout, try_help): New fns.
2244	(usage): Just print more detailed usage message; let caller exit.
2245	* diff.c (option_help): New variable.
2246	(filetype): Add Posix.1b file types.
2247
2248Fri Sep  2 16:01:49 1994  Paul Eggert  <eggert@twinsun.com>
2249
2250	* configure.in: Switch to new autoconf names.  Add sys/file.h test.
2251	* Makefile.in (distclean): Clean config.cache, config.log
2252	(used by new autoconf).
2253
2254	* diff.c, diff3.c, (main), sdiff.c (trapsigs): If we'll have children,
2255	make sure SIGCHLD isn't ignored.
2256
2257	* diff3.c (DIFF_CHUNK_SIZE): Removed.  Get size from STAT_BLOCKSIZE.
2258	(INT_STRLEN_BOUND): New macro.
2259
2260	* ifdef.c (format_group, groups_letter_value):
2261	Use * instead of [] in prototypes.
2262
2263	* system.h: Include <sys/file.h> only if HAVE_SYS_FILE_H.
2264	(S_IXGRP, S_IXOTH, S_IXUSR): Remove unused macros.
2265
2266	* util.c (begin_output): Check fdopen result.
2267
2268	The following changes simplify porting to non-Posix environments.
2269	* cmp.c, diff.c, diff3.c, sdiff.c, (main): Call initialize_main first.
2270	* diff.c (binary_I_O): New variable for --binary option.
2271	(main, usage, compare_files): Support --binary option.
2272	(compare_files): Use filename_lastdirchar to find last
2273	directory char in a file name.
2274	* cmp.c (main), diff.c (compare_files), dir.c (compare_names,
2275	diff_dirs): Use filename_cmp to compare file names.
2276	Use same_file to determine whether two files are the same.
2277	* context.c (print_context_label): Check whether ctime yields 0.
2278	* diff3.c (read_diff), sdiff.c (cleanup, main, waitpid),
2279	util.c (begin_output): Use popen+pclose if !HAVE_FORK.
2280	* io.c (sip): If HAVE_SETMODE, test for binary files in O_BINARY mode.
2281	* sdiff.c (ck_fdopen): Function removed.
2282	(edit): Use system if !HAVE_FORK.
2283	(execdiff): Now assumes caller has pushed all args, plus trailing 0.
2284	All callers changed.
2285	(private_tempnam): Try TMP if TMPDIR isn't defined.
2286	Fit temporary filenames into 8.3 limit.
2287	* system.h (STAT_BLOCKSIZE): Don't define if already defined.
2288	(min, max): Undef if already defined.
2289	(filename_cmp, filename_lastdirchar, HAVE_FORK, HAVE_SETMODE,
2290	initialize_main, O_BINARY, same_file): New macros.
2291
2292Fri Jun 17 11:23:53 1994  David J. MacKenzie  (djm@geech.gnu.ai.mit.edu)
2293
2294	* Makefile.in (info, dvi, diff.dvi): New targets.
2295	(clean): Remove TeX output files.
2296
2297Fri Jun 17 05:37:52 1994  Paul Eggert  (eggert@twinsun.com)
2298
2299	* cmp.c, io.c (word): Change from typedef to #define, to avoid
2300	collision with Unicos 8.0 <sys/types.h>, which also typedefs `word'.
2301
2302Thu Apr 15 00:53:01 1994  Paul Eggert  (eggert@twinsun.com)
2303
2304	* diff3.c (scan_diff_line), util.c (print_number_range): Don't
2305	rely on promotion to make the old-style parameter type agree
2306	with the prototype parameter type; this doesn't work on
2307	Apollos running bsd4.3.
2308
2309Mon Jan  3 02:05:51 1994  Paul Eggert  (eggert@twinsun.com)
2310
2311	* Makefile.in (LDFLAGS): Remove -g.  Change all link commands
2312	to use both $(CFLAGS) and $(LDFLAGS).
2313
2314Mon Dec 13 12:23:27 1993  Paul Eggert  (eggert@twinsun.com)
2315
2316	* system.h: Don't assume dirent.h exists just because
2317	_POSIX_VERSION is defined.
2318
2319Fri Dec  3 18:39:39 1993  Paul Eggert  (eggert@twinsun.com)
2320
2321	* diff.c (main): allow -pu.
2322
2323Tue Nov 23 03:51:08 1993  Paul Eggert  (eggert@twinsun.com)
2324
2325	* Makefile.in (distclean): Remove config.h.
2326
2327Wed Nov 10 00:28:27 1993  Paul Eggert  (eggert@twinsun.com)
2328
2329	* Version 2.6 released.
2330
2331	* analyze.c (too_expensive): New variable, for heuristic to
2332	limit the worst-case cost to O(N**1.5 log N) at the price of
2333	producing suboptimal output for large inputs with many differences.
2334	(diff_2_files): Initialize it.
2335	(struct partition): New type.
2336	(SNAKE_LIMIT): New macro; merely documents already-used number 20.
2337	(diag): New `minimal' arg; all callers changed.  Put results into
2338	struct partition.  Apply `too_expensive' heuristic.  Tune.
2339	(compareseq): New `minimal' arg; all callers changed.  Tune.
2340	(shift_boundaries): Improve heuristic to also coalesce adjacent runs
2341	of changes more often.
2342
2343	* diff.c (long_options, main, usage): Add `--help'.
2344	(main): Send version number to stdout, not stderr.
2345	(usage): Send usage to stdout, not stderr.
2346	(compare_files): Initialize `inf' properly.
2347
2348	* io.c (word): Change to `int'; it makes a big difference on x86.
2349	(sip, slurp): Put off allocating room to hold the whole file until we
2350	have to read the whole file.  This wins if the file turns out
2351	to be binary.
2352
2353	* util.c (xmalloc, xrealloc): "virtual memory" -> "memory"
2354	(primes): Omit large primes if INT_MAX is small.
2355
2356	* sdiff.c (usage): Send usage to stdout, not stderr.
2357	(long_options, main, usage): Add `--help'.
2358	(main): Send version number to stdout, not stderr.  Exit afterwards.
2359
2360	* diff3.c (usage): Send usage to stdout, not stderr.
2361	(long_options, main, usage): Add `--help'.
2362	(read_diff): Detect integer overflow in buffer size calculations.
2363
2364	* cmp.c (word): New type.  All uses of `long' for
2365	word-at-a-time comparisons changed to `word'.
2366	(long_options, main, usage): Add `--help'.
2367	(usage): Send usage to stdout, not stderr.
2368	(main): Add `-v'.  Send version number to stdout, not stderr.
2369
2370	* configure.in (AC_HAVE_HEADERS): Add unistd.h; remove AC_UNISTD_H.
2371
2372Mon Sep 27 07:20:24 1993  Paul Eggert  (eggert@twinsun.com)
2373
2374	* diff.c (add_exclude_file): Cast memchr to (char *)
2375	to suppress bogus warnings on some nonstandard hosts.
2376
2377	* Makefile.in (cmp): Add version.o.
2378
2379	* analyze.c (diff_2_files): Work around memcmp bug with size=0.
2380
2381	* cmp.c (main, usage, version_string): Add --version option.
2382
2383	* system.h (malloc, realloc): Declare only if !HAVE_STDLIB_H.
2384	(memchr): Declare only if !HAVE_MEMCHR.  These changes are
2385	needed to keep some nonstandard hosts happy.
2386
2387	* util.c (memchr): Make first arg char const *
2388	to match standard.
2389	(xmalloc, xrealloc): Cast malloc, realloc
2390	to (VOID *) to suppress bogus warnings on some nonstandard hosts.
2391
2392	* diff3.c (xmalloc, xrealloc): Cast malloc, realloc
2393	to (VOID *) to suppress bogus warnings on some nonstandard hosts.
2394
2395	* sdiff.c (xmalloc, xrealloc): Cast malloc, realloc
2396	to (VOID *) to suppress bogus warnings on some nonstandard hosts.
2397	(lf_copy, lf_skip, lf_snarf): Cast memchr to (char *)
2398	to suppress bogus warnings on some nonstandard hosts.
2399	(memchr): Make first arg char const *
2400	to match standard.
2401
2402Mon Sep 27 00:23:37 1993  Paul Eggert  (eggert@twinsun.com)
2403
2404	* Version 2.5 released.
2405
2406	* analyze.c (diff_2_files): Work around memcmp bug with size=0.
2407
2408	* cmp.c (main, usage, version_string): Add --version option.
2409	* Makefile.in (cmp): Add version.o.
2410
2411	* diff.c (add_exclude_file): Cast memchr to (char *)
2412	to suppress bogus warnings on some nonstandard hosts.
2413	* sdiff.c (lf_copy, lf_skip, lf_snarf): Likewise.
2414
2415	* diff3.c, sdiff.c, util.c (xmalloc, xrealloc): Cast malloc, realloc
2416	to (VOID *) to suppress bogus warnings on some nonstandard hosts.
2417
2418	* sdiff.c, util.c (memchr): Make first arg char const *
2419	to match standard.
2420
2421	* system.h (malloc, realloc): Declare only if !HAVE_STDLIB_H.
2422	(memchr): Declare only if !HAVE_MEMCHR.  These changes are
2423	needed to keep some nonstandard hosts happy.
2424
2425	* xmalloc.c: Include <sys/types.h> always; some nonstandard hosts
2426	need it for size_t even if STDC_HEADERS.
2427
2428Sat Sep 18 01:33:07 1993  Paul Eggert  (eggert@twinsun.com)
2429
2430	* configure.in (AC_STAT_MACROS_BROKEN): Add.
2431	* system.h (S_IS{BLK,CHR,DIR,FIFO,REG,SOCK}): Fix defns if
2432	STAT_MACROS_BROKEN.
2433
2434	* Makefile.in (diff3, sdiff, cmp): Do not link $(ALLOCA).
2435
2436	* analyze.c (discard_confusing_lines): Make defn static, like decl.
2437	* sdiff.c (xmalloc): Likewise.
2438
2439	* ifdef.c (format_group): Ensure isdigit argument isn't < 0.
2440
2441	* side.c (print_half_line): Use isprint, since some hosts lack isgraph.
2442	* util.c (output_1_line): Likewise.  Ensure its argument isn't < 0.
2443	(xmalloc, xrealloc): Remove needless casts.
2444
2445	* system.h (volatile, const):
2446	Define these before including any system headers,
2447	so that they're used consistently in all system includes.
2448	(getenv, malloc, realloc): Declare even if HAVE_STDLIB_H, since some
2449	<stdlib.h>s don't declare them.
2450	(memchr): Likewise for <string.h>.
2451
2452	* cmp.c, diff3.c, diff.h, sdiff.c: Include "system.h" first.
2453	* diff.c: Remove redundant "system.h" inclusion.
2454
2455	* diff3.c (xmalloc): Now static.
2456	(xmalloc, realloc): Remove needless casts.
2457	(READNUM): Ensure isdigit argument isn't negative.
2458
2459Wed Sep 14 07:14:15 1993  Paul Eggert  (eggert@twinsun.com)
2460
2461	* Version 2.4 released.
2462
2463	* ifdef.c (scan_char_literal): New function, for new %c'x' and
2464	%c'\ooo' format specs.
2465	(format_group, print_ifdef_lines): Use it.  Remove %0 format spec.
2466
2467	* cmp.c (cmp): Don't try to read past end of file; this doesn't
2468	work on ttys.
2469
2470	* system.h, version.c: #include <config.h>, not "config.h", to allow
2471	configuring in a separate directory when the source directory has
2472	already been configured.
2473	* Makefile.in (COMPILE): New defn, with proper -I options so that
2474	`#include <config.h>' works.
2475	(.c.o, diff3.o, sdiff.o): Use it.
2476
2477Mon Sep 13 06:45:43 1993  Paul Eggert  (eggert@twinsun.com)
2478
2479	* diff.c (main, longopts): Add --line-format=FORMAT option.
2480	(specify_format): Args no longer const pointers.  All callers changed.
2481
2482	* ifdef.c: Add support for %?c, %(A=B?T:E), PRINTF_SPECn formats.
2483	(struct group): New struct.
2484	(print_ifdef_lines): Use it to simplify argument passing.
2485	Remove the convention that last arg -1 signifies that the lines
2486	from file 2 are the same as the lines from file 1; this
2487	convention no longer works, now that line numbers might be
2488	printed out, since the line numbers may differ.
2489	Add first FILE * argument to output to.  All callers changed.
2490	Use a faster test for the single-fwrite optimization.
2491	(format_group, scan_printf_spec, groups_letter_value): New functions.
2492
2493	* diff.h (group_format, line_format): No longer const pointers.
2494	(format_ifdef): 1st arg is no longer const pointer.
2495
2496	* configure.in: Configure HAVE_LIMITS_H, HAVE_STDLIB_H.
2497	* system.h <limits.h>, <stdlib.h>, <string.h>:
2498	Include only if HAVE_LIMITS_H etc.
2499
2500	* system.h (memcmp, memcpy, strchr, strrchr, struct dirent): Prefer
2501	these standard names to the traditional names (bcmp, bcpy, index,
2502	rindex, struct direct).  All callers changed.
2503
2504	* system.h (PARAMS, VOID):
2505	Define earlier so that malloc decl can use VOID.
2506	(STAT_BLOCKSIZE): Simplify ersatz defn; just use 8K.
2507
2508Fri Sep  3 00:21:02 1993  Paul Eggert  (eggert@twinsun.com)
2509
2510	* diff.c (compare_files): Two files with the same name must be
2511	the same file; avoid a needless `stat' in that case.
2512
2513Fri Aug 27 06:59:03 1993  Paul Eggert  (eggert@twinsun.com)
2514
2515	* Pervasive changes for portability to 64-bit hosts:
2516	Add prototypes to function declarations.
2517	Use size_t, not int, when needed.
2518
2519	* Other pervasive changes:
2520	Use `const' more often.
2521	Use STD{IN,OUT,ERR}_FILENO instead of [012].
2522	Use 0, not NULL, for portability to broken hosts.
2523
2524	* Makefile.in: (srcs, objs, distfiles, cmp): New files cmpbuf.[ch].
2525	(distfiles): New files config.h.in, mkinstalldirs.
2526	(.c.o): Add -DHAVE_CONFIG_H.
2527
2528	* analyze.c: (diag): Pacify `gcc -Wall' with a useless assignment.
2529	(diff_2_files): Use l.c.m., not max, of files' buffer sizes.
2530
2531	* cmp.c: Make globals static when possible.
2532
2533	(file): Now a 2-element array; replaces `file1' and `file2'.
2534	(file_desc, buffer): Likewise, for file[12]_desc and buf[12].
2535	(main): Likewise, for stat_buf[12].  Index these variables with `i'.
2536
2537	(ignore_initial): New var.
2538	(long_options): Now const.  Add `--ignore-initial'.
2539	(usage): Sort options and add `--ignore-initial'.
2540	(main, cmp): Add `--ignore-initial' support.
2541
2542	(main): `cmp - -' now succeeds.
2543	When comparing standard input to a file, and using a shortcut (e.g.
2544	looking at file sizes or inode numbers), take the lseek offset into
2545	account before deciding whether the files are identical.
2546	Avoid mentioning `dev_t', `ino_t' for portability to nonstandard hosts.
2547	Use l.c.m. of files' buffer sizes, not 8 * 1024.
2548	ferror (stdout) does not imply errno has a useful value.
2549	If 2nd file is "-", treat it first, in case stdin is closed.
2550
2551	(cmp): Always compute `char_number', `smaller' for speed and simplicity.
2552	Say `cmp: EOF on input', not `/usr/gnu/bin/cmp: EOF on input',
2553	as per Posix.2.
2554
2555	(block_compare_and_count): Increment line_number argument.
2556	Remove end_char argument; it's always '\n'.  All callers changed.
2557	Do not assume sizeof(long) == 4; this isn't true on some 64-bit hosts.
2558	(block_compare): Minimize differences with block_compare_and_count.
2559
2560	(block_read): Coalesce `bp += nread's.
2561
2562	(printc): Remove `FILE *' arg; output to stdout.  All callers changed.
2563
2564	* configure.in: Configure HAVE_SIGACTION, RETSIGTYPE, HAVE_VPRINTF.
2565	Configure into config.h.
2566
2567	* context.c (print_context_label):
2568	Standard input's st_mtime is no longer a special case
2569	here, since `compare_files' now sets it to the current time.
2570
2571	* diff.c (usage): Sort options.
2572	(filetype): New function.
2573	(compare_files): Set stdin's st_mtime to be the current time.
2574	Leave its name "-" instead of changing it to "Standard Input";
2575	to test whether a file is stdin, we must compare its name to "-" instead
2576	of its desc to 0, since if it's closed other file descs may be 0.
2577	When comparing standard input to a file, and using a shortcut (e.g.
2578	looking at file sizes or inode numbers), take the lseek offset into
2579	account before deciding whether the files are identical.
2580	Pretend that nonexistent files have the same filetype as existing files.
2581	Rename `errorcount' to `failed', since it's boolean.
2582	In directory comparisons, if a file is neither a regular file nor a
2583	directory, just print its type and the other file's type.
2584
2585	* diff.h (Is_space, textchar): Remove.
2586	(struct msg, msg_chain, msg_chain_end): Move to util.c.
2587	(VOID): Move to system.h.
2588	(line_cmp, version_string, change_letter, print_number_range,
2589	find_change): New decls.
2590
2591	* diff.texi:
2592	whitespace -> white space.  It now stands for whatever isspace yields.
2593	Add --ignore-initial.
2594
2595	* diff3.c (VOID): Move to system.h.
2596	(version_string): Now char[].
2597	(usage): Sort options.
2598	(process_diff): Pacify `gcc -Wall' with a useless assignment.
2599	(read_diff): pid is of type pid_t, not int.  Use waitpid if available.
2600	(output_diff3): Simplify test for `\ No newline at end of file' message.
2601
2602	* dir.c (struct dirdata): Rename `files' to `names' to avoid confusion
2603	with external struct file_data `files'.
2604
2605	* io.c (line_cmp): Move declaration to diff.h.
2606	(textchar): Remove.
2607	(find_and_hash_each_line): Use locale's definition of white space
2608	instead of using one hardwired defn for -b and another for -w.
2609
2610	* normal.c (change_letter, print_number_range, find_change):
2611	Move decls to diff.h.
2612	(print_normal_hunk): Now static.
2613
2614	* sdiff.c (SEEK_SET): Move to system.h.
2615	(version_string): Now char[], not char*.
2616	(private_tempnam): Remove hardcoded limit on temporary file names.
2617	(exiterr, perror_fatal, main): When exiting because of a signal,
2618	exit with that signal's status.
2619	(lf_refill, main, skip_white, edit, interact): Check for signal.
2620	(ignore_SIGINT): Renamed from `ignore_signals'.
2621	(NUM_SIGS, initial_handler): New macros.
2622	(initial_action, signal_received, sigs_trapped): New vars.
2623	(catchsig, trapsigs): Use sigaction if possible, since this closes the
2624	windows of vulnerability that `signal' has.  Use RETSIGTYPE not void.
2625	When a signal comes in, just set a global variable; this is safer.
2626	(checksigs, untrapsig): New functions.
2627	(edit): Pacify `gcc -Wall' with a useless assignment.
2628	Respond to each empty line with help, not to every other empty line.
2629	(private_tempnam): Remove hardcoded limit on temporary file name length.
2630	Don't assume sizeof (pid_t) <= sizeof (int).
2631
2632	* system.h: (S_IXOTH, S_IXGRP, S_IXUSR,
2633	SEEK_SET, SEEK_CUR,
2634	STDIN_FILENO, STDOUT_FILENO, STDERR_FILENO):
2635	New macros, if system doesn't define them.
2636	(volatile): Don't define if already defined.
2637	(PARAMS): New macro.
2638	(VOID): Move here from diff.h.
2639
2640	* util.c (struct msg, msg_chain, msg_chain_end): Moved here from diff.h.
2641	(message5): New function.
2642	(pr_pid): New var.
2643	(begin_output): Allocate `name' more precisely.
2644	Put child pid into pr_pid, so that we can wait for it later.
2645	Don't check execl's return value, since any return must be an error.
2646	(finish_output): Detect and report output errors.
2647	Use waitpid if available.  Check pr exit status.
2648	(line_cmp): Use locale's definition of white space
2649	instead of using one hardwired defn for -b and another for -w.
2650	(analyze_cmp): Avoid double negation with `! nontrivial'.
2651	Pacify `gcc -Wall' be rewriting for-loop into do-while-loop.
2652	(dir_file_pathname): New function.
2653
2654	* version.c (version_string): Now char[], not char*.
2655
2656Thu Jul 29 20:44:30 1993  David J. MacKenzie  (djm@wookumz.gnu.ai.mit.edu)
2657
2658	* Makefile.in (config.status): Run config.status --recheck, not
2659	configure, to get the right args passed.
2660
2661Thu Jul 22 10:46:30 1993  Paul Eggert  (eggert@twinsun.com)
2662
2663	* Makefile.in (dist): Replace `if [ ! TEST ]; then ACTION; fi'
2664	with `[ TEST ] || ACTION || exit' so that the containing for-loop exits
2665	with proper status for `make'.
2666
2667Thu Jul  8 19:47:22 1993  David J. MacKenzie  (djm@goldman.gnu.ai.mit.edu)
2668
2669	* Makefile.in (installdirs): New target.
2670	(install): Use it.
2671	(Makefile, config.status, configure): New targets.
2672
2673Sat Jun  5 23:10:40 1993  Paul Eggert  (eggert@twinsun.com)
2674
2675	* Makefile.in (dist): Switch from .z to .gz.
2676
2677Wed May 26 17:16:02 1993  Paul Eggert  (eggert@twinsun.com)
2678
2679	* diff.c (main): Cast args to compare_files, for traditional C.
2680	* side.c (print_sdiff_common_lines, print_sdiff_hunk): Likewise.
2681	* analyze.c, diff3.c, sdiff.c, util.c: Don't assume NULL is defined
2682	properly.
2683
2684Tue May 25 14:54:05 1993  Paul Eggert  (eggert@twinsun.com)
2685
2686	* analyze.c (diff_2_files):  With -q, do not report that files differ
2687	if all their differences are ignored.
2688	(briefly_report): New function.
2689	* diff.h (ignore_some_changes): New variable.
2690	* diff.c (compare_files): Don't use the file size shortcut if
2691	ignore_some_changes is nonzero, since the file size may differ
2692	merely due to ignored changes.
2693	(main):  Set ignore_some_changes if we might ignore some changes.
2694	Remove unsystematic assignment of 0 to static vars.
2695	* io.c (read_files): New argument PRETEND_BINARY says whether to
2696	pretend the files are binary.
2697
2698	* diff3.c (tab_align_flag): New variable, for new -T option.
2699	(main, usage, output_diff3): Add support for -T.
2700
2701Sun May 23 15:25:29 1993  Richard Stallman  (rms@mole.gnu.ai.mit.edu)
2702
2703	* dir.c (dir_sort): Always init `data' to avoid GCC warning.
2704
2705Sat May 22 15:35:02 1993  Paul Eggert  (eggert@twinsun.com)
2706
2707	* Makefile.in (dist): Change name of package from diff to diffutils.
2708	Don't bother to build .Z dist; .z suffices.
2709
2710Fri May 21 16:35:22 1993  Paul Eggert  (eggert@twinsun.com)
2711
2712	* diff.c: Include "system.h" to get memchr declaration.
2713	* system.h (memchr): Declare if !HAVE_MEMCHR, not if
2714	!HAVE_MEMCHR && !STDC_HEADERS.
2715
2716Wed May 19 17:43:55 1993  Paul Eggert  (eggert@twinsun.com)
2717
2718	* Version 2.3 released.
2719
2720Fri Apr 23 17:18:44 1993  Paul Eggert  (eggert@twinsun.com)
2721
2722	* io.c (find_identical_ends): Do not discard the last HORIZON_LINES
2723	lines of the prefix, or the first HORIZON_LINES lines of the suffix.
2724	* diff.c (main, longopts, usage): Add --horizon-lines option.
2725	* diff3.c (main, process_diff, read_diff): Invoke second diff
2726	with --horizon-lines determined by the first diff.
2727	* diff.h, diff3.c (horizon_lines): New variable.
2728
2729Mon Mar 22 16:16:00 1993  Roland McGrath  (roland@churchy.gnu.ai.mit.edu)
2730
2731	* system.h [HAVE_STRING_H || STDC_HEADERS] (bcopy, bcmp, bzero):
2732	Don't define if already defined.
2733
2734Fri Mar  5 00:20:16 1993  Richard Stallman  (rms@mole.gnu.ai.mit.edu)
2735
2736	* diff.c (main): Use NULL in arg to compare_files.
2737
2738Thu Feb 25 15:26:01 1993  Roland McGrath  (roland@churchy.gnu.ai.mit.edu)
2739
2740	* system.h: Declare memchr #if !HAVE_MEMCHR && !STDC_HEADERS,
2741	not #if !HAVE_MEMCHR || !STDC_HEADERS.
2742
2743Mon Feb 22 15:04:46 1993  Richard Stallman  (rms@geech.gnu.ai.mit.edu)
2744
2745	* io.c (find_identical_ends): Move complicated arg outside GUESS_LINES.
2746
2747Mon Feb 22 12:56:12 1993  Roland McGrath  (roland@churchy.gnu.ai.mit.edu)
2748
2749	* Makefile.in (.c.o): Add -I$(srcdir); put $(CFLAGS) last before $<.
2750
2751Sat Feb 20 19:18:56 1993  Richard Stallman  (rms@mole.gnu.ai.mit.edu)
2752
2753	* io.c (binary_file_p): Return zero if file size is zero.
2754
2755Fri Feb 19 17:31:32 1993  Roland McGrath  (roland@geech.gnu.ai.mit.edu)
2756
2757	* Version 2.2 released.
2758
2759	* system.h [HAVE_STRING_H || STDC_HEADERS] (index, rindex): Don't
2760	define if already defined.
2761
2762Wed Feb 17 17:08:00 1993  Roland McGrath  (roland@churchy.gnu.ai.mit.edu)
2763
2764	* Makefile.in (srcs): Remove limits.h.
2765
2766Thu Feb 11 03:36:00 1993  Richard Stallman  (rms@mole.gnu.ai.mit.edu)
2767
2768	* diff3.c (xmalloc): No longer static.
2769
2770	* sdiff.c (edit): Allocate buf dynamically.
2771
2772	* dir.c (dir_sort): Handle VOID_CLOSEDIR.
2773
2774Wed Feb 10 00:15:54 1993  Richard Stallman  (rms@mole.gnu.ai.mit.edu)
2775
2776	* limits.h: File deleted (should never have been there).
2777
2778Tue Feb  9 03:53:22 1993  Richard Stallman  (rms@mole.gnu.ai.mit.edu)
2779
2780	* Makefile.in (.c.o, diff3.o, sdiff.o): Put $(CFLAGS) last.
2781
2782Wed Feb  3 15:42:10 1993  David J. MacKenzie  (djm@goldman.gnu.ai.mit.edu)
2783
2784	* system.h: Don't #define const; let configure do it.
2785
2786Mon Feb  1 02:13:23 1993  Paul Eggert  (eggert@hal.gnu.ai.mit.edu)
2787
2788	* Version 2.1 released.
2789
2790	* Makefile.in (dist): Survive ln failures.  Create .tar.z
2791	(gzipped tar) file as well as .tar.Z (compressed tar) file.
2792
2793Fri Jan  8 22:31:41 1993  Paul Eggert  (eggert@twinsun.com)
2794
2795	* side.c (print_half_line): When the input position falls
2796	outside the column, do not output a tab even if the output
2797	position still falls within the column.
2798
2799Mon Dec 21 13:54:36 1992  David J. MacKenzie  (djm@kropotkin.gnu.ai.mit.edu)
2800
2801	* Makefile.in (.c.o): Add -I.
2802
2803Fri Dec 18 14:08:20 1992  Paul Eggert  (eggert@twinsun.com)
2804
2805	* configure.in: Add HAVE_FCNTL_H, since system.h uses it.
2806
2807Tue Nov 24 10:06:48 1992  David J. MacKenzie  (djm@goldman.gnu.ai.mit.edu)
2808
2809	* Makefile.in: Note change from USG to HAVE_STRING_H.
2810
2811Mon Nov 23 18:44:00 1992  Paul Eggert  (eggert@twinsun.com)
2812
2813	* io.c (find_and_hash_each_line): When running out of lines,
2814	double the number of allocated lines, instead of just doubling
2815	that number minus the prefix lines.  This is more likely to
2816	avoid the need for further memory allocation.
2817
2818Wed Nov 18 20:40:28 1992  Paul Eggert  (eggert@twinsun.com)
2819
2820	* dir.c (dir_sort): Plug memory leak: space holding directory
2821	contents was not being reclaimed.  Get directory size from
2822	struct file_data for initial guess at memory needed.
2823	Detect errors when reading and closing directory.
2824	(diff_dirs): Pass struct file_data to dir_sort.  Finish plugging leak.
2825	* diff.c (compare_files): Pass struct file_data to diff_dirs.
2826
2827	* io.c (find_and_hash_each_line): Don't assume alloc_lines is
2828	nonzero when allocating more lines.
2829
2830Thu Nov 12 16:02:18 1992  Paul Eggert  (eggert@twinsun.com)
2831
2832	* diff.c (main): Add `-U lines' as an alias for `--unified=lines'.
2833
2834	* diff3.c (usage): Add third --label option in example.
2835
2836	* util.c (analyze_hunk): Fix test for ignoring blank lines.
2837
2838	* configure.in, system.h: Avoid USG; use HAVE_TIME_H etc. instead.
2839
2840Mon Nov  9 05:13:25 1992  Paul Eggert  (eggert@twinsun.com)
2841
2842	* diff3.c (main, usage): Add -A or --show-all.
2843	-m now defaults to -A, not -E.  Allow up to three -L options.
2844	(output_diff3_edscript, output_diff3_merge):
2845	Remove spurious differences between these two functions.
2846	Output ||||||| for -A.  Distinguish between conflicts and overlaps.
2847	(dotlines, undotlines): New functions that output `Ns', not `N,Ns'.
2848	(output_diff3_edscript, output_diff3_merge): Use them.
2849
2850	* io.c (find_identical_ends): shift_boundaries needs an extra
2851	identical line at the end, not at the beginning.
2852
2853	* sdiff.c (edit): execvp wants char **, not const char **.
2854
2855Mon Oct 19 04:39:32 1992  Paul Eggert  (eggert@twinsun.com)
2856
2857	* context.c (print_context_script, find_function): Context
2858	line numbers start with - file->prefix_lines, not 0.
2859
2860	* io.c (binary_file_p): Undo last change; it was a library bug.
2861
2862Sun Oct 18 00:17:29 1992  Richard Stallman  (rms@mole.gnu.ai.mit.edu)
2863
2864	* io.c (binary_file_p): Consider empty file as non-binary.
2865
2866Mon Oct  5 05:18:46 1992  Paul Eggert  (eggert@twinsun.com)
2867
2868	* diff3.c (main, make_3way_diff, using_to_diff3_block): Don't
2869	report bogus differences (for one of -mexEX3) just because the
2870	file0-file1 diffs don't line up with the file0-file2 diffs.
2871	(This is entirely possible since we don't use diff's -n
2872	option.)  Always compare file1 to file2, so that diff3 sees
2873	those changes directly.  Typically, file2 is now the common
2874	file, not file0.
2875	(output_diff3_merge): The input file is file 0, not the common file.
2876
2877	(FC, FO): New macros; they replace FILE1, FILE0 for two-way diffs,
2878	to distinguish them from three-way diffs.
2879
2880	* diff3.c (using_to_diff3_block): Fold repeated code into loops.
2881
2882	* diff3.c (make_3way_diff, process_diff): Have the *_end
2883	variable point to the next field to be changed, not to the last
2884	object allocated; this saves an if-then-else.
2885
2886	* diff3.c (process_diff): Use D_NUMLINES instead of its definiens.
2887
2888	* diff3.c: Make fns and vars static unless they must be external.
2889
2890Wed Sep 30 09:21:59 1992  Paul Eggert  (eggert@twinsun.com)
2891
2892	* analyze.c (diff_2_files): OUTPUT_IFDEF is now robust.
2893	* diff.h (ROBUST_OUTPUT_STYLE): Likewise.
2894	(default_line_format): Remove.  All refs removed.
2895
2896	* ifdef.c (print_ifdef_lines): Add %L.  Optimize %l\n even if user
2897	specified it, as opposed to its being the default.
2898
2899Tue Sep 29 19:01:28 1992  Paul Eggert  (eggert@twinsun.com)
2900
2901	* diff.c (longopts, main): --{old,new,unchanged,changed}--group-format
2902	are new options, so that -D is no longer overloaded.  Set
2903	no_diff_means_no_output if --unchanged-{line,group}-format allows it.
2904	* diff.h (enum line_class): New type.
2905	(group_format, line_format): Use it to regularize option flags.
2906	All refs changed.
2907
2908	* ifdef.c (format_ifdef, print_ifdef_lines): %n is no longer a format.
2909
2910Mon Sep 28 04:51:42 1992  Paul Eggert  (eggert@twinsun.com)
2911
2912	* diff.c (main, usage): Replace --line-prefix with the more general
2913	--{old,new,unchanged}-line-format options.
2914	* ifdef.c (format_ifdef, print_ifdef_lines): Likewise.
2915	* diff.h (line_format): Renamed from line_prefix.  All refs changed.
2916	* diff.h, ifdef.c (default_line_format): New variable.
2917	* util.c (output_1_line): New function.
2918	(print_1_line): Use it.
2919
2920	* ifdef.c: (format_ifdef, print_ifdef_lines): Add %0 format.
2921
2922Sun Sep 27 05:38:13 1992  Paul Eggert  (eggert@twinsun.com)
2923
2924	* diff.c (main): Add -E or --line-prefix option.  Add -D'=xxx'
2925	for common lines.  Change default -D< format from copy of -D>
2926	format to to -D<%<; similarly for default -D> format.
2927	* diff.h (common_format, line_prefix): New variables.
2928	* ifdef.c (format_ifdef): New function.
2929	(print_ifdef_script, print_ifdef_hunk, print_ifdef_lines):
2930	Use it for -D'=xxx', -E.
2931
2932	* context.c (find_hunk): Glue together two non-ignorable changes that
2933	are exactly CONTEXT * 2 lines apart.  This shortens output, removes
2934	a behavioral discontinuity at CONTEXT = 0, and is more compatible
2935	with traditional diff.
2936
2937	* io.c (find_identical_ends): Slurp stdin at most once.
2938
2939	* util.c (print_line_line): line_flag is const char *.
2940
2941Thu Sep 24 15:18:07 1992  Paul Eggert  (eggert@twinsun.com)
2942
2943	* ifdef.c (print_ifdef_lines): New function, which fwrites a sequence
2944	of lines all at once for speed.
2945	(print_ifdef_script, print_ifdef_hunk): Use it.
2946
2947Thu Sep 24 05:54:14 1992  Paul Eggert  (eggert@twinsun.com)
2948
2949	* diff.c (main): Support new -D options for if-then-else formats.
2950	(specify_format): New function.
2951	* diff.h (ifndef_format, ifdef_format, ifnelse_format): New variables.
2952	* ifdef.c (print_ifdef_hunk): Use the new variables instead of
2953	a hardwired format.
2954
2955	* side.c (print_1sdiff_line): Represent incomplete lines on output.
2956	(print_sdiff_script): Likewise.  Don't print 'q' at end,
2957	since that doesn't work with incomplete lines.
2958	* sdiff.c (interact): Don't assume diff output ends with 'q' line.
2959	* diff.h (ROBUST_OUTPUT_STYLE): OUTPUT_SDIFF is now robust.
2960
2961	* sdiff.c (lf_copy, lf_snarf): Use memchr instead of index,
2962	to avoid dumping core when files contain null characters.
2963	(memchr): New function (if memchr is missing).
2964
2965	* io.c (sip): New arg SKIP_TEST to skip test for binary file.
2966	(read_files): Don't bother testing second file if first is binary.
2967
2968Thu Sep 17 21:17:49 1992  David J. MacKenzie  (djm@nutrimat.gnu.ai.mit.edu)
2969
2970	* system.h [!USG && !_POSIX_VERSION]: Protect from conflicting
2971	prototype for wait in sys/wait.h.
2972
2973Wed Sep 16 12:32:18 1992  David J. MacKenzie  (djm@nutrimat.gnu.ai.mit.edu)
2974
2975	* Makefile.in: Include binprefix in -DDIFF_PROGRAM.
2976
2977Tue Sep 15 14:27:25 1992  David J. MacKenzie  (djm@nutrimat.gnu.ai.mit.edu)
2978
2979	* Version 2.0.
2980
2981Sat Sep 12 01:31:19 1992  David J. MacKenzie  (djm@nutrimat.gnu.ai.mit.edu)
2982
2983	* util.c, diff.h, system.h [!HAVE_MEMCHR]: Don't use void *
2984	and const when declaring memchr replacement.  Declare memchr
2985	if !STDC_HEADERS && !USG.
2986
2987Thu Sep 10 15:17:32 1992  David J. MacKenzie  (djm@nutrimat.gnu.ai.mit.edu)
2988
2989	* Makefile.in (uninstall): New target.
2990
2991	* diff.c (excluded_filename): Use fnmatch, not wildmat.
2992	(usage): Document -x, -X, --exclude, --exclude-from.
2993	Makefile.in: Use fnmatch.c, not wildmat.c.
2994
2995Sun Sep  6 23:46:25 1992  Paul Eggert (eggert@twinsun.com)
2996
2997	* configure.in: Add HAVE_MEMCHR.
2998	* diff.h, util.c: Use it instead of MEMCHR_MISSING.
2999
3000Sun Sep  6 07:25:49 1992  Paul Eggert (eggert@twinsun.com)
3001
3002	* diff.h: (struct line_def): Replace this 3-word struct with char *.
3003	This uses less memory, particularly for large files with short lines.
3004	(struct file_data): New member linbuf_base counts number of lines
3005	in common prefix that are not recorded in linbuf;
3006	this uses less memory if files are identical or differ only at end.
3007	New member buffered_lines counts possibly differing lines.
3008	New member valid_lines counts valid data.
3009	New member alloc_lines - linbuf_base replaces old linbufsize.
3010	linbuf[0] now always points at first differing line.
3011	Remove unused members ltran, suffix_lines.
3012	Add const where appropriate.
3013	(Is_space): New macro, for consistent definition of `white space'.
3014	(excluded_filename, memchr, sip, slurp): New declarations.
3015	* ed.c (print_ed_hunk): Adjust to diff.h's struct changes.
3016	* context.c (pr_context_hunk): Likewise.
3017	* ifdef.c (print_ifdef_script): Likewise.
3018	* side.c (print_sdiff_script, print_half_line): Likewise.
3019	* util.c (analyze_hunk, line_cmp, print_1_line): Likewise.
3020
3021	* analyze.c (shift_boundaries): Remove unneeded variable `end' and
3022	unnecessary comparisons of `preceding' and `other_preceding' against 0.
3023	(diff_2_files): When comparing files byte-by-byte for equality,
3024	don't slurp them all in at once; just compare them a buffer at a time.
3025	This can win big if they differ early on.
3026	Move some code to compare_files to enable this change.
3027	Use only one buffer for stdin with `diff - -'.
3028	(discard_confusing_lines, diff_2_files): Coalesce malloc/free calls.
3029	(build_script): Remove obsolete OUTPUT_RCS code.
3030
3031	* diff.c (add_exclude, add_exclude_file, excluded_filename): New fns.
3032	(main): Use them for the new --exclude and --exclude-from options.
3033	(compare_files): Don't open a file unless it must be read.
3034	Treat `diff file file' and `diff file dir' similarly.
3035	Move some code here from diff_2_files to enable this.
3036	Simplify file vs dir warning.
3037
3038	* dir.c (dir_sort): Support new --exclude* options.
3039
3040	* io.c (struct equivclass): Put hash code and line length here instead
3041	of struct line_def, so that they can be shared.
3042	(find_and_hash_each_line): Compute equivalence class as we go,
3043	instead of doing it in a separate pass; this thrashes memory less.
3044	Make buckets realloc-able, since we can't preallocate them.
3045	Record one more line start than there are lines, so that we can compute
3046	any line's length by subtracting its start from the next line's,
3047	instead of storing the length explicitly.  This saves memory.
3048	Move prefix-handling code to find_identical_ends;
3049	this wins with large prefixes.
3050	Use Is_space, not is_space, for consistent treatment of white space.
3051	(prepare_text_end): New function.
3052	(find_identical_ends): Move slurping here, so it's only done when
3053	needed.  Work even if the buffers are the same (because of `diff - -').
3054	Compare prefixes a word at a time for speed.
3055	(find_equiv_class): Delete; now done by find_and_hash_each_line.
3056	(read_files): Don't slurp unless needed.
3057	find_equiv_class's work is now folded into find_and_hash_each_line.
3058	Don't copy stdin buffer if `diff - -'.
3059	Check for running out of primes.
3060	(sip, slurp): Split first part of `slurp' into another function `sip'.
3061	`sip' sets things up and perhaps reads the first ST_BLKSIZE buffer to
3062	see whether the file is binary; `slurp' now just finishes the job.
3063	This lets diff_2_files compare binary files lazily.
3064	Allocate a one-word sentinel to allow word-at-a-time prefix comparison.
3065	Count prefix lines only if needed, only count the first file's prefix.
3066	Don't bother to count suffix lines; it's never needed.
3067	Set up linbuf[0] to point at first differing line.
3068	(binary_file_p): Change test for binary files:
3069	if it has a null byte in its first buffer, it's binary.
3070	(primes): Add more primes.
3071
3072	* util.c (line_cmp): Use bcmp for speed.
3073	Use Is_space, not is_space, for consistent treatment of white space.
3074	(translate_line_number): Internal line numbers now count from 0
3075	starting after the prefix.
3076	(memchr): New function (if memchr is missing).
3077
3078	* Makefile.in: Document HAVE_ST_BLKSIZE.  Link with wildmat.o.
3079	* system.h (STAT_BLOCKSIZE): New macro based on HAVE_ST_BLKSIZE.
3080	* configure.in: Add AC_ST_BLKSIZE.
3081	* wildmat.c: New file.
3082
3083Fri Sep  4 01:28:51 1992  Richard Stallman  (rms@mole.gnu.ai.mit.edu)
3084
3085	* sdiff.c (xmalloc): Renamed from ck_malloc.  Callers changed.
3086
3087Thu Sep  3 15:28:59 1992  David J. MacKenzie  (djm@nutrimat.gnu.ai.mit.edu)
3088
3089	* diff.h: Don't declare free, index, rindex.
3090
3091Tue Aug 11 22:18:06 1992  John Gilmore  (gnu at cygnus.com)
3092
3093	* io.c (binary_file_p):  Use heuristic to avoid declaring info
3094	files as binary files.  Allow about 1.5% non-printing
3095	characters (in info's case, ^_).
3096
3097Tue Jul  7 01:09:26 1992  David J. MacKenzie  (djm@nutrimat.gnu.ai.mit.edu)
3098
3099	* diff.h: Replace function_regexp and ignore_regexp with lists
3100	of compiled regexps.
3101	* analyze.c, context.c, util.c: Test whether the lists, not
3102	the old variables, are empty.
3103	* util.c (analyze_hunk), context.c (find_function): Compare
3104	lines with the lists of regexps.
3105	* diff.c (add_regexp): New function.
3106	(main): Use it.
3107
3108	* diff3: Add -v --version option.
3109	* Makefile.in: Link with version.o.
3110
3111	* system.h: New file.
3112	* diff.h, cmp.c, diff3.c, sdiff.c: Use it.
3113
3114	* diff.h, diff3.c: Include string.h or strings.h, as appropriate.
3115	Declare malloc and realloc.
3116
3117	* diff3.c (perror_with_exit): Include program name in message.
3118
3119	* diff3.c: Lowercase error messages for GNU standards.
3120
3121	* sdiff.c [USG || STDC_HEADERS]: Define bcopy in terms of memcpy.
3122
3123	* sdiff.c: Use the version number from version.c.
3124	* Makefile.in: Link with version.o.
3125
3126	* cmp.c error.c xmalloc.c: New files from textutils.
3127	* Makefile.in: Add rules for them.
3128
3129	* diff.c (longopts): --unidirectional-new-file is like -P, not -N.
3130	Rename --file-label to --label (leave old name, but undocumented).
3131
3132	* sdiff.c, diff.c (usage): Condense messages and fix some errors.
3133
3134	* diff3.c (main, usage): Add long-named options.
3135
3136Fri Jul  3 14:31:18 1992  David J. MacKenzie  (djm@nutrimat.gnu.ai.mit.edu)
3137
3138	* diff.h, diff3.c, sdiff.c: Change FOO_MISSING macros to HAVE_FOO.
3139
3140Thu Jun 25 16:59:47 1992  David J. MacKenzie  (djm@apple-gunkies.gnu.ai.mit.edu)
3141
3142	* diff.c: --reversed-ed -> --forward-ed.
3143
3144Wed Feb 26 12:17:32 1992  Paul Eggert  (eggert@yata.uucp)
3145
3146	* analyze.c, diff.c, diff.h, io.c: For -y, compare even if same file.
3147
3148Fri Feb 14 22:46:38 1992  Richard Stallman  (rms@mole.gnu.ai.mit.edu)
3149
3150	* io.c, diff3.c, analyze.c: Add extra parentheses.
3151
3152Sun Feb  9 00:22:42 1992  Richard Stallman  (rms@mole.gnu.ai.mit.edu)
3153
3154	* diff.h (unidirectional_new_file_flag): New variable.
3155	* diff.c (main): Set that for -P.
3156	(compare_files): Support -P, somewhat like -N.
3157	(longopts): Support long name for -P.
3158
3159Sat Jan  4 20:10:34 1992  Paul Eggert (eggert at yata.uucp)
3160
3161	* Makefile.in: Distribute diff.info-* too.
3162
3163	* README, sdiff.c: version number now matches version.c.
3164
3165	* configure: Fix and document vfork test.
3166
3167	* ifdef.c: Don't dump core if `diff -Dx f f'.
3168
3169Mon Dec 23 23:36:08 1991  David J. MacKenzie  (djm at wookumz.gnu.ai.mit.edu)
3170
3171	* diff.h, diff3.c, sdiff.c: Change POSIX ifdefs to
3172	HAVE_UNISTD_H and _POSIX_VERSION.
3173
3174Wed Dec 18 17:00:31 1991  David J. MacKenzie  (djm at wookumz.gnu.ai.mit.edu)
3175
3176	* Makefile.in (srcs): Add sdiff.c.
3177	(tapefiles): Add diff.texi and diff.info.
3178
3179	* diff.h, diff3.c, sdiff.c: Use HAVE_VFORK_H instead of
3180	VFORK_HEADER and VFORK_WORKS.
3181
3182Tue Dec 17 00:02:59 1991  Paul Eggert  (eggert at yata.uucp)
3183
3184	* Makefile.in (all): Add diff.info, sdiff.
3185
3186	* configure, diff.c, sdiff.c:
3187	Prefix long options with `--', not `+'.
3188	* diff.c: Regularize option names.
3189
3190	* configure: Fix check for vfork.
3191	* configure, diff.c, diff.h, diff3.c, sdiff.c:
3192	Use Posix definitions when possible.
3193
3194	* context.c: Align context with tab if -T is given.  Tune.
3195	* diff.c, diff.h, side.c: Calculate column widths so that tabs line up.
3196	* io.c: Add distinction between white space and printing chars.
3197	* side.c: Don't expand tabs unless -t is given.
3198	* side.c, util.c: Tab expansion now knows about '\b', '\f', '\r', '\v'.
3199	* util.c: -w skips all white space.  Remove lint.  Tune.
3200
3201	* sdiff.c: Support many more diff options, e.g. `-', `sdiff file dir'.
3202	Ignore interrupts while the subsidiary editor is in control.
3203	Clean up temporary file and kill subsidiary diff if interrupted.
3204	Ensure subsidiary diff doesn't ignore SIGPIPE.
3205	Don't get confused while waiting for two subprocesses.
3206	Don't let buffers overflow.  Check for I/O errors.
3207	Convert to GNU style.  Tune.
3208
3209	* sdiff.c, util.c: Don't lose errno.
3210	Don't confuse sdiff with messages like `Binary files differ'.
3211	* sdiff.c, side.c: Don't assume that common lines are identical.
3212	Simplify --sdiff-merge-assist format.
3213
3214Mon Sep 16 16:42:01 1991  Tom Lord  (lord at churchy.gnu.ai.mit.edu)
3215
3216	* Makefile.in, sdiff.c: introduced sdiff front end to diff.
3217
3218	* Makefile.in, analyze.c, diff.c, diff.h, io.c, side.c: Added
3219	sdiff-style output format to diff.
3220
3221Mon Aug 26 16:44:55 1991  David J. MacKenzie  (djm at pogo.gnu.ai.mit.edu)
3222
3223	* Makefile.in, configure: Only put $< in Makefile if using VPATH,
3224	because older makes don't understand it.
3225
3226Fri Aug  2 12:22:30 1991  David J. MacKenzie  (djm at apple-gunkies)
3227
3228	* configure: Create config.status.  Remove it and Makefile if
3229	interrupted while creating them.
3230
3231Thu Aug  1 22:24:31 1991  David J. MacKenzie  (djm at apple-gunkies)
3232
3233	* configure: Check for +srcdir etc. arg and look for
3234	Makefile.in in that directory.  Set VPATH if srcdir is not `.'.
3235	* Makefile.in: Get rid of $(archpfx).
3236
3237Tue Jul 30 21:28:44 1991  Richard Stallman  (rms at mole.gnu.ai.mit.edu)
3238
3239	* Makefile.in (prefix): Renamed from DESTDIR.
3240
3241Wed Jul 24 23:08:56 1991  David J. MacKenzie  (djm at wookumz.gnu.ai.mit.edu)
3242
3243	* diff.h, diff3.c: Rearrange ifdefs to use POSIX,
3244	STDC_HEADERS, VFORK_MISSING, DIRENT.  This way it works on
3245	more systems that aren't pure USG or BSD.
3246	Don't not define const if __GNUC__ is defined -- that would
3247	break with -traditional.
3248	* configure: Check for those features.
3249
3250Wed Jul 10 01:39:23 1991  David J. MacKenzie  (djm at wookumz.gnu.ai.mit.edu)
3251
3252	* configure, Makefile.in: $(INSTALLPROG) -> $(INSTALL).
3253
3254Sat Jul  6 16:39:04 1991  David J. MacKenzie  (djm at geech.gnu.ai.mit.edu)
3255
3256	* Replace Makefile with configure and Makefile.in.
3257	Update README with current compilation instructions.
3258
3259Sat Jul  6 14:03:29 1991  Richard Stallman  (rms at mole.gnu.ai.mit.edu)
3260
3261	* util.c (setup_output): Just save the args for later use.
3262	(begin_output): Do the real work, with the values that were saved.
3263	It's safe to call begin_output more than once.
3264	Print the special headers for context format here.
3265	* analyze.c (diff_2_files): Don't print special headers here.
3266	* context.c (pr_context_hunk, pr_unidiff_hunk): Call begin_output.
3267	* ed.c (print_ed_hunk, print_forward_ed_hunk, print_rcs_hunk):
3268	* normal.c (print_normal_hunk): Likewise.
3269	* ifdef.c (print_ifdef_hunk): Likewise.
3270	* util.c (finish_output): Don't die if begin_output was not called.
3271
3272Thu Jun 20 23:10:01 1991  David J. MacKenzie  (djm at geech.gnu.ai.mit.edu)
3273
3274	* Makefile: Add TAGS, distclean, and realclean targets.
3275	Set SHELL.
3276
3277Tue Apr 30 13:54:36 1991  Richard Stallman  (rms at mole.gnu.ai.mit.edu)
3278
3279	* diff.h (TRUE, FALSE): Undefine these before defining.
3280
3281Thu Mar 14 18:27:27 1991  Richard Stallman  (rms@mole.ai.mit.edu)
3282
3283	* Makefile (objs): Include $(ALLOCA).
3284
3285Sat Mar  9 22:34:03 1991  Richard Stallman  (rms at mole.ai.mit.edu)
3286
3287	* diff.h: Include regex.h.
3288
3289Thu Feb 28 18:59:53 1991  Richard Stallman  (rms at mole.ai.mit.edu)
3290
3291	* Makefile (diff3): Link with GNU getopt.
3292
3293Sat Feb 23 12:49:43 1991  Richard Stallman  (rms at mole.ai.mit.edu)
3294
3295	* io.c (find_equiv_class): Make hash code unsigned before mod.
3296
3297	* diff.h (files): Add EXTERN.
3298
3299Sun Jan 13 21:33:01 1991  Richard Stallman  (rms at mole.ai.mit.edu)
3300
3301	* diff.c: +print option renamed +paginate.  Remove +all-text.
3302
3303Mon Jan  7 06:18:01 1991  David J. MacKenzie  (djm at geech.ai.mit.edu)
3304
3305	* Makefile (dist): New target, replacing diff.tar and
3306	diff.tar.Z, to encode version number in distribution directory
3307	and tar file names.
3308
3309Sun Jan  6 18:42:23 1991  Michael I Bushnell  (mib at geech.ai.mit.edu)
3310
3311	* Version 1.15 released.
3312
3313	* version.c: Updated from 1.15 alpha to 1.15
3314
3315	* context.c (print_context_number_range,
3316	print_unidiff_number_range): Don't print N,M when N=M, print
3317	just N instead.
3318
3319	* README: Updated for version 1.15.
3320	Makefile: Updated for version 1.15.
3321
3322	* diff3.c (main): Don't get confused if one of the arguments
3323	is a directory.
3324
3325	* diff.c (compare_files): Don't get confused if comparing
3326	standard input to a directory; print error instead.
3327
3328	* analyze.c (diff_2_files), context.c (print_context_header,
3329	print_context_script), diff.c (main), diff.h (enum
3330	output_style): Tread unidiff as an output style in its own
3331	right.  This also generates an error when both -u and -c are
3332	given.
3333
3334	* diff.c (main): Better error messages when regexps are bad.
3335
3336	* diff.c (compare_files): Don't assume stdin is opened.
3337
3338	* diff3.c (read_diff): Don't assume things about the order of
3339	descriptor assignment and closes.
3340
3341	* util.c (setup_output): Don't assume things about the order
3342	of descriptor assignment and closes.
3343
3344	* diff.c (compare_files): Set a flag so that closes don't
3345	happen more than once.
3346
3347	* diff.c (main): Don't just flush stdout, do a close.  That
3348	way on broken systems we can still get errors.
3349
3350Mon Dec 24 16:24:17 1990  Richard Stallman  (rms at mole.ai.mit.edu)
3351
3352	* diff.c (usage): Use = for args of long options.
3353
3354Mon Dec 17 18:19:20 1990  Michael I Bushnell  (mib at geech.ai.mit.edu)
3355
3356	* context.c (print_context_label): Labels were interchanged badly.
3357
3358	* context.c (pr_unidiff_hunk): Changes to deal with files
3359	ending in incomplete lines.
3360	* util.c (print_1_line): Other half of the changes.
3361
3362Mon Dec  3 14:23:55 1990  Richard Stallman  (rms at mole.ai.mit.edu)
3363
3364	* diff.c (longopts, usage): unidiff => unified.
3365
3366Wed Nov  7 17:13:08 1990  Richard Stallman  (rms at mole.ai.mit.edu)
3367
3368	* analyze.c (diff_2_files): No warnings about newlines for -D.
3369
3370	* diff.c (pr_unidiff_hunk): Remove ref to output_patch_flag.
3371
3372Tue Oct 23 23:19:18 1990  Richard Stallman  (rms at mole.ai.mit.edu)
3373
3374	* diff.c (compare_files): For -D, compare even args are same file.
3375	* analyze.c (diff_2_files): Likewise.
3376	Also, output even if files have no differences.
3377
3378	* analyze.c (diff_2_files): Print missing newline messages last.
3379	Return 2 if a newline is missing.
3380	Print them even if files end with identical text.
3381
3382Mon Oct 22 19:40:09 1990  Richard Stallman  (rms at mole.ai.mit.edu)
3383
3384	* diff.c (usage): Return 2.
3385
3386Wed Oct 10 20:54:04 1990  Richard Stallman  (rms at mole.ai.mit.edu)
3387
3388	* diff.c (longopts): Add +new-files.
3389
3390Sun Sep 23 22:49:29 1990  Richard Stallman  (rms at mole.ai.mit.edu)
3391
3392	* context.c (print_context_script): Handle unidiff_flag.
3393	(print_context_header): Likewise.
3394	(print_unidiff_number_range, pr_unidiff_hunk): New functions.
3395	* diff.c (longopts): Add element for +unidiff.
3396	(main): Handle +unidiff and -u.
3397	(usage): Mention them.
3398
3399Wed Sep  5 16:33:22 1990  Richard Stallman  (rms at mole.ai.mit.edu)
3400
3401	* io.c (find_and_hash_each_line): Deal with missing final newline
3402	after buffering necessary context lines.
3403
3404Sat Sep  1 16:32:32 1990  Richard Stallman  (rms at mole.ai.mit.edu)
3405
3406	* io.c (find_identical_ends): ROBUST_OUTPUT_FORMAT test was backward.
3407
3408Thu Aug 23 17:17:20 1990  Richard Stallman  (rms at mole.ai.mit.edu)
3409
3410	* diff3.c (WIFEXITED): Undef it if WEXITSTATUS is not defined.
3411	* context.c (find_function): Don't try to return values.
3412
3413Wed Aug 22 11:54:39 1990  Richard Stallman  (rms at mole.ai.mit.edu)
3414
3415	* diff.h (O_RDONLY): Define if not defined.
3416
3417Tue Aug 21 13:49:26 1990  Richard Stallman  (rms at mole.ai.mit.edu)
3418
3419	* Handle -L option.
3420	* context.c (print_context_label): New function.
3421	(print_context_header): Use that.
3422	* diff.c (main): Recognize the option.
3423	(usage): Updated.
3424	* diff.h (file_label): New variable.
3425	* diff3.c (main): Recognize -L instead of -t.
3426
3427	* diff3.c (main): Support -m without other option.
3428
3429	* diff3.c (WEXITSTATUS, WIFEXITED): Define whenever not defined.
3430
3431	* diff3.c (bcopy, index, rindex): Delete definitions; not used.
3432	(D_LINENUM, D_LINELEN): Likewise.
3433	(struct diff_block): lengths includes newlines.
3434	(struct diff3_block): Likewise.
3435	(always_text, merge): New variables.
3436	(read_diff): Return address of end, not size read.  Calls changed.
3437	Pass -a to diff if given to diff3.
3438	current_chunk_size now an int.  Detect error in `pipe'.
3439	Check for incomplete line of output here.
3440	(scan_diff_line): Don't make scan_ptr + 2 before knowing it is valid.
3441	No need to check validity of diff output here.
3442	Include newline in length of line.
3443	(main): Compute rev_mapping here.  Handle -a and -m.
3444	Error message if excess -t operands.  Error for incompatible options.
3445	Error if `-' given more than once.
3446	Fix error storing in tag_strings.
3447	(output_diff3): REV_MAPPING is now an arg.  Call changed.
3448	Change syntax of "missing newline" message.
3449	Expect length of line to include newline.
3450	(output_diff3_edscript): Return just 0 or 1.
3451	REV_MAPPING is now an arg.  Call changed.
3452	(output_diff3_merge): New function.
3453	(process_diff): Better error message for bad diff format.
3454	(fatal, perror_with_exit): Return status 2.
3455
3456	* analyze.c (diff_2_files): Report missing newline in either
3457	or both files, if not robust output style.
3458
3459	* util.c (setup_output): Detect error from pipe.
3460	No need to close stdin.
3461
3462	* util.c (print_1_line): Change format of missing-newline msg.
3463	Change if statements to switch.
3464
3465	* io.c (slurp): Don't mention differences in final newline if -B.
3466
3467	* io.c (binary_file_p): Use ISO char set as criterion, not ASCII.
3468
3469	* io.c (find_identical_ends): Increase value of BEG0 by 1.
3470	Other changes in backwards scan to avoid decrementing pointers
3471	before start of array, and set LINES properly.
3472
3473	* diff.h (ROBUST_OUTPUT_STYLE): New macro.
3474	* io.c (find_identical_ends, find_and_hash_each_line): Use that macro.
3475
3476	* diff.h (dup2): Don't define if XENIX.
3477
3478	* diff.c (main): Check for write error at end.
3479
3480	* context.c (find_function): Don't return a value.
3481	Use argument FILE rather than global files.
3482
3483	* analyze.c: Add external function declarations.
3484	* analyze.c (build_script): Turn off explicit check for final newline.
3485
3486	* analyze.c (discard_confusing_lines): Make integers unsigned.
3487
3488Tue Jul 31 21:37:16 1990  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)
3489
3490	* io.c (find_and_hash_each_line): Correct the criterion
3491	for leaving out the newline from the end of the line.
3492
3493Tue May 29 21:28:16 1990  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)
3494
3495	* dir.c (diff_dirs): Free things only if nonzero.
3496
3497Mon Apr 16 18:31:05 1990  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)
3498
3499	* diff.h (NDIR_IN_SYS): New macro controls location of ndir.h.
3500
3501	* diff3.c (xmalloc, xrealloc): Don't die if size == 0 returns 0.
3502
3503Sun Mar 25 15:58:42 1990  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)
3504
3505	* analyze.c (discard_confusing_lines):
3506	`many' wasn't being used; use it.
3507	Canceling provisionals near start of run must handle already
3508	canceled provisionals.
3509	Canceling subruns of provisionals was canceling last nonprovisional.
3510
3511Sat Mar 24 14:02:51 1990  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)
3512
3513	* analyze.c (discard_confusing_lines):
3514	Threshold for line occurring many times scales by square root
3515	of total lines.
3516	Within each run, cancel any long subrun of provisionals.
3517	Don't update `provisional' while canceling provisionals.
3518	In big outer loop, handle provisional and nonprovisional separately.
3519
3520Thu Mar 22 16:35:33 1990  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)
3521
3522	* analyze.c (discard_confusing_lines):
3523	The first loops to discard provisionals from ends failed to step.
3524	In second such loops, keep discarding all consecutive provisionals.
3525	Increase threshold for stopping discarding, and also check for
3526	consecutive nondiscardables as separate threshold.
3527
3528Fri Mar 16 00:33:08 1990  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)
3529
3530	* diff3.c (read_diff): Pass -- as first arg to diff.
3531
3532	* diff3.c: Include wait.h or define equivalent macros.
3533	(read_diff): Don't use stdio printing error in the inferior.
3534	Remember the pid and wait for it.  Report failing status.
3535	Report failure of vfork.
3536
3537Sun Mar 11 17:10:32 1990  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)
3538
3539	* diff3.c (main): Accept -t options and pass to output_diff3_edscript.
3540	(usage): Mention -t.
3541	(read_diff): Use vfork.
3542	(vfork): Don't use it on Sparc.
3543
3544	* diff.h (vfork): Don't use it on Sparc.
3545
3546Tue Mar  6 22:37:20 1990  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)
3547
3548	* diff3.c (dup2): Don't define on Xenix.
3549
3550	* Makefile: Comments for Xenix.
3551
3552Thu Mar  1 17:19:23 1990  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)
3553
3554	* analyze.c (diff_2_files): `message' requires three args.
3555
3556Fri Feb 23 10:56:50 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
3557
3558	* diff.h, util.c, diff3.c: Change 'void *' to 'VOID *', with
3559	VOID defined as void if __STDC__, char if not.
3560
3561Sun Feb 18 20:31:58 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
3562
3563	* Makefile: Add rules for getopt.c, getopt1.c, getopt.h.
3564
3565	* getopt.c, getopt.h, getopt1.c: New files.
3566
3567	* main.c (main, usage): Add long options.
3568
3569	* analyze.c (shift_boundaries): Remove unused var 'j_end'.
3570
3571Thu Feb  8 02:43:16 1990  Jim Kingdon  (kingdon at pogo.ai.mit.edu)
3572
3573	* GNUmakefile: include ../Makerules before Makefile.
3574
3575Fri Feb  2 23:21:38 1990  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)
3576
3577	* analyze.c (diff_2_files): If -B or -I, don't return 1
3578	if all changes were ignored.
3579
3580Wed Jan 24 20:43:57 1990  Richard Stallman  (rms at albert.ai.mit.edu)
3581
3582	* diff3.c (fatal): Output to stderr.
3583
3584Thu Jan 11 00:25:56 1990  David J. MacKenzie  (djm at hobbes.ai.mit.edu)
3585
3586	* diff.c (usage): Mention -v.
3587
3588Wed Jan 10 16:06:38 1990  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)
3589
3590	* diff3.c (output_diff3_edscript): Return number of overlaps.
3591	(main): If have overlaps, exit with status 1.
3592
3593Sun Dec 24 10:29:20 1989  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)
3594
3595	* io.c (find_equiv_class): Fix typo that came from changing init of B
3596	to an assignment.
3597
3598	* version.c: New file.
3599	* diff.c (main): -v prints version number.
3600
3601	* io.c (binary_file_p): Null char implies binary file.
3602
3603Fri Nov 17 23:44:55 1989  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)
3604
3605	* util.c (print_1_line): Fix off by 1 error.
3606
3607Thu Nov 16 13:51:10 1989  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)
3608
3609	* util.c (xcalloc): Function deleted.
3610
3611	* io.c (slurp): Null-terminate the buffer.
3612
3613	* io.c (read_files): Delete unused vars.
3614
3615	* io.c (find_equiv_class): Don't index by N if too low.
3616
3617	* dir.c (dir_sort): Delete the extra declaration of compare_names.
3618
3619	* diff.h: Don't declare xcalloc.  Declare some other functions.
3620
3621	* analyze.c (shift_boundaries):
3622	Test for END at end of range before indexing by it.
3623	Fix misspelling of `preceding' in var names.
3624
3625Sat Nov 11 14:04:16 1989  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)
3626
3627	* diff3.c (using_to_diff3_block): Delete unused vars.
3628	(make_3way_diff, process_diff_control, read_diff, output_diff3): Likewise.
3629
3630Mon Nov  6 18:15:50 EST 1989 Jay Fenlason (hack@ai.mit.edu)
3631
3632	* README Fix typo.
3633
3634Fri Nov  3 15:27:47 1989  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)
3635
3636	* diff.c (usage): Mention -D.
3637
3638	* ifdef.c (print_ifdef_hunk): Write comments on #else and #endif.
3639
3640Sun Oct 29 16:41:07 1989  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)
3641
3642	* diff.c (compare_files): Don't fflush for identical files.
3643
3644Wed Oct 25 17:57:12 1989  Randy Smith  (randy at apple-gunkies.ai.mit.edu)
3645
3646	* diff3.c (using_to_diff3_block): When defaulting lines from
3647	FILE0, only copy up to just under the *lowest* line mentioned
3648	in the next diff.
3649
3650	* diff3.c (fatal): Add \n to error messages.
3651
3652Wed Oct 25 15:05:49 1989  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)
3653
3654	* Makefile (tapefiles): Add ChangeLog.
3655
3656Tue Oct  3 00:51:17 1989  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)
3657
3658	* diff3.c (process_diff, create_diff3_block): Init ->next field.
3659
3660Fri Sep 29 08:16:45 1989  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)
3661
3662	* util.c (line_cmp): Alter end char of line 2, not line 1.
3663
3664Wed Sep 20 00:12:37 1989  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)
3665
3666	* Makefile (diff.tar): Expect ln to fail on some files;
3667	copy them with cp.
3668
3669Mon Sep 18 02:54:29 1989  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)
3670
3671	* Handle -D option:
3672	* io.c (find_and_hash_each_line): Keep all lines of 1st file.
3673	* diff.c (main): Handle -D option.
3674	(compare_files): Reject -D if files spec'd are directories.
3675	* analyze.c (diff_2_files): Handle OUTPUT_IFDEF case.
3676
3677Fri Sep  1 20:15:50 1989  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)
3678
3679	* diff.c (option_list): Rename arg VECTOR as OPTIONVEC.
3680
3681Mon Aug 28 17:58:27 1989  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)
3682
3683	* diff.c (compare_files): Clear entire inf[i].stat.
3684
3685Wed Aug 23 17:48:47 1989  Richard Stallman  (rms at apple-gunkies.ai.mit.edu)
3686
3687	* io.c (find_identical_ends): Sign was backward
3688	determining where to bound the scan for the suffix.
3689
3690Wed Aug 16 12:49:16 1989  Richard Stallman  (rms at hobbes.ai.mit.edu)
3691
3692	* analyze.c (diff_2_files): If -q, treat all files as binary.
3693	* diff.c (main): Detect -q, record in no_details_flag.
3694
3695Sun Jul 30 23:12:00 1989  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)
3696
3697	* diff.c (usage): New function.
3698	(main): Call it.
3699
3700Wed Jul 26 02:02:19 1989  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)
3701
3702	* diff.c (main): Make -C imply -c.
3703
3704Thu Jul 20 17:57:51 1989  Chris Hanson  (cph at kleph)
3705
3706	* io.c (find_and_hash_each_line): Bug fix in context handling,
3707	introduced by last change.
3708
3709Fri Jul 14 17:39:20 1989  Chris Hanson  (cph at kleph)
3710
3711	* analyze.c: To make RCS work correctly on files that don't
3712	necessarily end in newline, introduce some changes that cause
3713	diffs to be sensitive to missing final newline.  Because
3714	non-RCS modes don't want to be affected by these changes, they
3715	are conditional on `output_style == OUTPUT_RCS'.
3716	(diff_2_files) [OUTPUT_RCS]: Suppress the "File X missing
3717	newline" message.
3718	(build_script) [OUTPUT_RCS]: Cause the last line to compare as
3719	different if exactly one of the files is missing its final
3720	newline.
3721
3722	* io.c (find_and_hash_each_line): Bug fix in
3723	ignore_space_change mode.  Change line's length to include the
3724	newline.  For OUTPUT_RCS, decrement last line's length if
3725	there is no final newline.
3726	(find_identical_ends) [OUTPUT_RCS]: If one of the files is
3727	missing a final newline, make sure it's not included in either
3728	the prefix or suffix.
3729
3730	* util.c (print_1_line): Change line output routine to account
3731	for line length including the newline.
3732
3733Tue Jun 27 02:35:28 1989  Roland McGrath  (roland at hobbes.ai.mit.edu)
3734
3735	* Makefile: Inserted $(archpfx) where appropriate.
3736
3737Wed May 17 20:18:43 1989  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)
3738
3739	* diff3.c [USG]: Include fcntl.h.
3740
3741	* diff.h [USG]: New compilation flags HAVE_NDIR, HAVE_DIRECT.
3742
3743Wed Apr 26 15:35:57 1989  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)
3744
3745	* dir.c (diff_dirs): Two new args, NONEX1 and NONEX2, say to pretend
3746	nonex dirs are empty.
3747	(dir_sort): New arg NONEX, likewise.
3748	* diff.c (compare_files): Pass those args.
3749	Sometimes call diff_dirs if subdir exists in just one place.
3750
3751Wed Apr 12 01:10:27 1989  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)
3752
3753	* io.c (find_identical_ends): Set END0 *after* last char
3754	during backward scan for suffix.
3755
3756Sat Apr  8 15:49:49 1989  Randall Smith  (randy at apple-gunkies.ai.mit.edu)
3757
3758	* diff3.c (using_to_diff3_block): Now find high marks in files 1
3759	and 2 through mapping off of the last difference instead of the
3760	first.
3761
3762	* diff3.c: Many trivial changes to spelling inside comments.
3763
3764Fri Feb 24 12:38:03 1989  Randall Smith  (randy at gluteus.ai.mit.edu)
3765
3766	* util.c, normal.c, io.c, ed.c, dir.c, diff.h, diff.c, context.c,
3767	analyze.c, Makefile: Changed copyright header to conform with new
3768	GNU General Public license.
3769	* diff3.c: Changed copyright header to conform with new GNU
3770	General Public license.
3771	* COPYING: Made a hard link to /gp/rms/COPYING.
3772
3773Fri Feb 24 10:01:58 1989  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)
3774
3775	* io.c (slurp): Leave 2 chars space at end of buffer, not one.
3776	(find_identical_ends): Special case if either file is empty;
3777	don't try to make a sentinel since could crash.
3778
3779Wed Feb 15 14:24:48 1989  Jay Fenlason  (hack at apple-gunkies.ai.mit.edu)
3780
3781	* diff3.c (message)  Re-wrote routine to avoid using alloca()
3782
3783Wed Feb 15 06:19:14 1989  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)
3784
3785	* io.c (find_identical_ends): Delete the variable `bytes'.
3786
3787Sun Feb 12 11:50:36 1989  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)
3788
3789	* io.c (slurp): ->bufsize is nominal amount we have room for;
3790	add room for sentinel when calling xmalloc or xrealloc.
3791
3792	* io.c (find_identical_ends): Do need overrun check in finding suffix.
3793
3794Fri Feb 10 01:28:15 1989  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)
3795
3796	* diff.c (main): -C now takes arg to specify context length.
3797	Now -p to show C function name--Damned IEEE!
3798	Fatal error if context length spec'd twice.
3799
3800	* ed.c (print_ed_hunk): Now special treatment only for lines containing
3801	precisely a dot and nothing else.  Output `..', end the insert,
3802	substitute that one line, then resume the insert if nec.
3803
3804	* io.c (find_and_hash_lines): When backing up over starting context,
3805	don't move past buffer-beg.
3806
3807	* io.c (find_identical_ends): Use sentinels to make the loops faster.
3808	If files are identical, skip the 2nd loop and return quickly.
3809	(slurp): Leave 1 char extra space after each buffer.
3810
3811	* analyze.c (diff_2_files): Mention difference in final newlines.
3812
3813Wed Jan 25 22:44:44 1989  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)
3814
3815	* dir.c (diff_dirs): Use * when calling fcn ptr variable.
3816
3817Sat Dec 17 14:12:06 1988  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)
3818
3819	* Makefile: New vars INSTALL and LIBS used in some rules;
3820	provide default defns plus commented-put defns for sysV.
3821
3822Thu Nov 17 16:42:53 1988  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)
3823
3824	* dir.c (dir_sort): Open-trouble not fatal; just say # files is -1.
3825	(diff_dirs): If dir_sort does that, give up and return 2.
3826
3827	* diff.c (compare_files): Don't open directories.
3828	Don't close them specially either.
3829	Cross-propagate inf[i].dir_p sooner.
3830
3831Sun Nov 13 11:19:36 1988  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)
3832
3833	* diff.h: Declare index, rindex.
3834
3835	* diff.c (compare_files): If comparing foodir with b/f,
3836	use foodir/f, not foodir/b/f.
3837
3838	* diff.c (compare_files): Don't print "are identical" msg for 2 dirs.
3839	Status now 1 if one file is a dir and the other isn't, etc.
3840
3841Thu Nov  3 16:30:24 1988  Randall Smith  (randy at gluteus.ai.mit.edu)
3842
3843	* Makefile: Added a define for diff3 to define DIFF_PROGRAM.
3844
3845	* util.c: Added hack to make sure that perror was not called with
3846	a null pointer.
3847
3848	* diff.c: Changed S_IFDIR to S_IFMT in masking type of file bits
3849	out.
3850
3851	* diff3.c: Included USG compatibility defines.
3852
3853	* diff.h: Moved sys/file.h into #else USG section (not needed or
3854	wanted on System V).
3855
3856	* ed.c, analyze.c, context.c: Shortened names to 12 characters for
3857	the sake of System V (too simple not to do).
3858
3859
3860Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1997, 1998, 1999,
38612000, 2001, 2002 Free Software Foundation, Inc.
3862
3863This file is part of GNU Diffutils.
3864
3865This program is free software; you can redistribute it and/or modify
3866it under the terms of the GNU General Public License as published by
3867the Free Software Foundation; either version 2, or (at your option)
3868any later version.
3869
3870This program is distributed in the hope that they will be useful,
3871but WITHOUT ANY WARRANTY; without even the implied warranty of
3872MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
3873GNU General Public License for more details.
3874
3875You should have received a copy of the GNU General Public License
3876along with this program; see the file COPYING.  If not, write to
3877the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
3878Boston, MA 02111-1307, USA.
3879