529 Commits

Author SHA1 Message Date
Paul Eggert
1d63e8c4d1 (jm_PREREQ): Add jm_PREREQ_HARD_LOCALE.
(jm_PREREQ_HARD_LOCALE): New macro.
2002-03-12 06:34:28 +00:00
Paul Eggert
0d3dcc25e7 (alloca): Remove.
Include stdlib.h if available, for malloc.
(hard_locale): Use malloc, not alloca.  Test for storage allocation failure.
2002-03-12 06:34:28 +00:00
Paul Eggert
8fe985d988 (Overview): byte != character.
(Detailed Context, Detailed Unified, Alternate Names, diff Options): Do not document diff -L.
(Comparing Directories): Do not document diff -P.
(Making Patches, diff Options): Likewise.
(diff Performance, sdiff Option Summary, diff Options, sdiff Options): Do not document diff -H.
(diff Performance, diff Options): Do not document --horizon-lines.
(cmp Options): Prefer -b to -c.
(cmp Options, diff Options, diff3 Options, sdiff Options): Put short
options next to the similar long options.
Document --help, and use the same wording for --verbose on all commands.
(diff3 Options): Fix typo in description of -E, which used wrongly used
"-e" instead of "-E".
(patch Options): Put short options next to the similar long options.
2002-03-12 06:34:28 +00:00
Paul Eggert
2839f50782 Do not distribute shar file. 2002-03-11 08:37:01 +00:00
Paul Eggert
db6505cbe5 Initial revision 2002-03-11 08:23:30 +00:00
Paul Eggert
91bee67606 (option_help_msgid, usage): Reword for help2man. 2002-03-11 08:00:47 +00:00
Paul Eggert
68f96e5cd7 Remove trailing white space. 2002-03-11 08:00:47 +00:00
Paul Eggert
4f981362a7 (option_help_msgid): Reword for help2man. 2002-03-11 08:00:47 +00:00
Paul Eggert
d001fbedbe (usage): Reword for help2man. 2002-03-11 08:00:47 +00:00
Paul Eggert
dbea9821b7 (AUTOMAKE_OPTIONS): Remove. 2002-03-11 08:00:47 +00:00
Paul Eggert
796ad2bc35 Add zh_TW. 2002-03-11 08:00:47 +00:00
Paul Eggert
b3dabc9571 (AUTOMAKE_OPTIONS): Remove gnits. 2002-03-11 08:00:47 +00:00
Paul Eggert
6d9d2036a2 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Change wording of message.
Do not check for stdbool.h or ucontext.h, or for ucontext_t or
sigaction or sigaltstack.
2002-03-11 08:00:47 +00:00
Paul Eggert
1e15bf9664 Include <errno.h>
(ENOTSUP): Define if errno.h doesn't.
(SA_NODEFER, SA_ONSTACK, SA_RESETHAND, SA_SIGINFO, SIGSTKSZ, _SC_PAGESIZE,
ALTERNATE_STACK_SIZE, stack_t, sigaltstack): Remove; we now assume them
all when HAVE_XSI_STACK_OVERFLOW_HEURISTIC, so we don't need substitutes.
(<ucontext.h>): Include only if HAVE_XSI_STACK_OVERFLOW_HEURISTIC.
(alternate_signal_stack): Now of size SIGSTKSZ, not ALTERNATE_STACK_SIZE.
(segv_handler): Simplify, under the assumption that
HAVE_XSI_STACK_OVERFLOW_HEURISTIC is nonzero.
(c_stack_action): Likewise.
(exit_failure) [DEBUG]: Initialize to 0, not 1.
(recurse, main) [DEBUG]: Remove main args.
2002-03-11 08:00:47 +00:00
Paul Eggert
1ada67d90b (AC_INIT): Change package name from diff to diffutils. Bump version
to 2.7.9.
(AM_INIT_AUTOMAKE): Use new form, with options gnits dist-shar,
rather than old from that duplicated AC_INIT.
(AM_MISSING_PROG): Add help2man.
(REGEX_MALLOC): Define.
(AC_CONFIG_FILES): Add man/Makefile.
2002-03-11 07:09:22 +00:00
Paul Eggert
f88dc3e8ed Add man pages. 2002-03-11 07:08:45 +00:00
Paul Eggert
3ec1124c9f (AUTOMAKE_OPTIONS): Remove.
(SUBDIRS): Add man.
2002-03-11 07:07:05 +00:00
Paul Eggert
f28f42d6d6 Update to autoconf 2.53, automake 1.6, help2man 1.25 with patch.
.
2002-03-11 07:07:05 +00:00
Paul Eggert
b89a1f4f2c Tweak editing of install-info-am and
uninstall-info-am targets, to include 8+3-butchered names of Info
files.
2002-03-02 11:56:17 +00:00
Paul Eggert
a0303415a5 Remove trailing white space 2002-03-01 19:46:11 +00:00
Paul Eggert
6e1f365f51 Initial revision 2002-03-01 07:42:20 +00:00
Paul Eggert
be90df3756 Include <xalloc.h>. 2002-02-28 08:05:12 +00:00
Paul Eggert
56e47cdf45 (LONG_OPTION, GROUP_FORMAT_OPTION, LINE_FORMAT_OPTION): Remove.
(longopts): Revert to prevision version.
2002-02-28 08:05:12 +00:00
Paul Eggert
145637ede6 Reword to put POSIX first. 2002-02-28 07:35:36 +00:00
Paul Eggert
aa3a3c3a11 diff -NUM is now deprecated.
diff now takes the maximum of the specified contexts.
Conflicting options now cause an error again.
"Microsoft OSes" -> DGJPP
2002-02-28 07:26:14 +00:00
Paul Eggert
2fb91b7373 (AC_INIT, AM_INIT_AUTOMAKE): Version 2.7.8
(AC__GNU_SOURCE): Add this, replacing AH_VERBATIM of _GNU_SOURCE.
(AM_GNU_GETTEXT): Add external arg, from gettext 0.11.
(tempname): Use AC_LIBOBJS, not LIBOBJS=, as now required by autoconf.
(jm_PREREQ_C_STACK): Add.
(AC_CONFIG_FILES): Remove intl/Makefile.
2002-02-28 06:32:34 +00:00
Paul Eggert
de95c16082 2 -> EXIT_TROUBLE.
Adopt POSIX convention for ENOEXEC and exit status 126.
unsigned -> unsigned int
2002-02-28 05:22:26 +00:00
Paul Eggert
52fbd2fdd4 Don't use alloca or include <alloca.h>.
unsigned -> unsigned int
(EXIT_SUCCESS, EXIT_FAILURE, EXIT_TROUBLE): Define if not defined.
Include signal.h.
(SA_RESTART): Define if not defined.
(SIGCHLD): Likewise.
2002-02-28 05:22:26 +00:00
Paul Eggert
3064374e47 unsigned -> unsigned int. 2002-02-28 05:22:26 +00:00
Paul Eggert
0d7a3eb7ac Include c-stack.h, exitfail.h. Do not include signal.h.
0 -> EXIT_SUCCESS, 1 -> EXIT_FAILURE, 2 -> EXIT_TROUBLE.
(ck_editor_status): New function.
(main): Check for stack overflow.
Adopt POSIX convention for subsidiary programs not found.
(diffarg): Check for integer overflow to avoid core dumps.
(trapsigs): Remove SA_INTERRUPT special case; now done by header.
(SIGCHLD): Likewise.
(edit): Adopt POSIX convention for subsidiary programs not found.
2002-02-28 05:22:26 +00:00
Paul Eggert
4179042755 (sip): Avoid integer overflow and core dumps if buffer alignments are
preposterously incompatible.
(slurp): Do not dump core if the file is growing as we read it.
If a regular file grows, keep reading until we catch up with its EOF.
(find_and_hash_each_line): Check for integer overflow to avoid core dumps.
(GUESS_LINES): Remove.
(guess_lines): New function.  Avoid integer overflow.
(find_identical_ends): Use it.
Avoid integer overflow and possible core dumps.
2002-02-28 05:03:41 +00:00
Paul Eggert
9d39ee103c (format_group, print_ifdef_lines): Avoid core dumps with
bad formats.
(do_printf_spec): Avoid alloca.
2002-02-28 05:03:41 +00:00
Paul Eggert
1ae253c28b (dir_read): Ignore st_size of directories: POSIX says it's garbage.
Check for integer overflow to avoid core dumps.
(diff_dirs): 0 -> EXIT_SUCCESS, 2 -> EXIT_TROUBLE.
2002-02-28 05:03:41 +00:00
Paul Eggert
309c90b06b Include c-stack.h, exitfail.h.
(ALLOCATE): Remove.  All uses changed to xmalloc, or to xmalloc plus
an overflow check.
(myread): Remove.
(main): Check for stack overflow.
0 -> EXIT_SUCCESS, 1 -> EXIT_FAIULRE, 2 -> EXIT_TROUBLE.
(try_help): Likewise.
(process_diff): Check for integer overflow, to avoid core dumps.
2 -> EXIT_TROUBLE.
(read_diff): Exit with status 126 if the file is not executable,
for compatibility with POSIX 1003.1-2001.
Accommodate ancient AIX hosts that set errno to EINTR after uncaught
SIGCONT.
Check for integer overflow to avoid core dumps.
(fatal, perror_with_exit): 2 -> EXIT_TROUBLE.
2002-02-28 05:03:41 +00:00
Paul Eggert
8a8172ed6d Include c-stack.h, exitfail.h.
Do not include signal.h.
(specify_style, specify_value): Bring these routines back, as POSIX
requires that the order of options not matter.
(shortopts): New constant.
(group_format_option, line_format_option): New constants.
(LONG_OPTION, GROUP_FORMAT_OPTION, LINE_FORMAT_OPTION): New macros.
(longopts): Use them.
(main): 0 -> EXIT_SUCCESS, 1 -> EXIT_FAILURE, 2 -> EXIT_TROUBLE.
Ensure that order of options does not matter.
Check for stack overflow.
If contexts overflow, substitute LIN_MAX, as that's good enough.
If multiple contexts are specified, use their maximum.
-c is equivalent to -C 3 now, instead of having an implicit context;
likewise for -u and -U 3.
Use specify_style and specify_value.
(SIGCHLD): Do not define; now done in a header.
Use new style time stamp format for -u / -U.
Reject numeric-string options if operating in POSIX 1003.1-2001 mode.
Avoid overflow problems with tab width.
Simplify from-file and to-file code.
(usage): Do not mention obsolete options.
(filetype): Do not mention whether a file is executable.
Add typed memory objects.
(compare_files): 0 -> EXIT_SUCCESS, 1 -> EXIT_FAILURE, 2 -> EXIT_TROUBLE.
2002-02-28 05:03:41 +00:00
Paul Eggert
c959ef6232 (pr_context_hunk): Do not dump core if an enormous context causes an
arithmetic overflow.
(pr_unidiff_hunk): Likewise.
(find_hunk): Likewise.
2002-02-28 04:48:46 +00:00
Paul Eggert
4aae6ffeaf Include c-stack.h, exitfail.h.
(hard_locale_LC_MESSAGES): Depend on ENABLE_NLS.
(try_help, check_stdout, main, cmp): 2 -> EXIT_TROUBLE.
(main): Check for stack overflow.
0 -> EXIT_SUCCESS.
1 -> EXIT_FAILURE.
(cmp): Likewise.
Accommodate ancient AIX hosts that set errno to
EINTR after uncaught SIGCONT.
2002-02-28 04:48:46 +00:00
Paul Eggert
e53339d2dc (diff_2_files): Avoid arithmetic overflow in buffer size calculation. 2002-02-28 04:28:07 +00:00
Paul Eggert
1035ed370d (datadir): @DATADIRNAME@ -> share.
(INCLUDES): Remove intl.
(LDADD): Change INTLLIBS to LIBINTL.  No need to link libdiffutils.a twice.
2002-02-28 04:28:07 +00:00
Paul Eggert
e7d9579f6a Add lib/c-stack.c, src/dir.c. 2002-02-28 04:28:07 +00:00
Paul Eggert
58166227e9 Add cs, ja. 2002-02-28 04:28:07 +00:00
Paul Eggert
07c7dac163 (AC_FUNC_SETMODE_DOS): Check for fcntl.h and unistd.h unconditionally. 2002-02-28 04:28:07 +00:00
Paul Eggert
570f74da59 (jm_PREREQ): Add jm_PREREQ_POSIXVER.
(jm_PREREQ_POSIXVER): New macro.
2002-02-28 04:28:07 +00:00
Paul Eggert
9f0eff52c2 Initial revision 2002-02-28 04:28:07 +00:00
Paul Eggert
8d9e3b29bf (buffer_lcm): New arg LCM_MAX. 2002-02-28 04:28:07 +00:00
Paul Eggert
47b633e3cf Include errno.h.
(errno): Declare if !STDC_HEADERS.
Include signal.h.
(SA_RESTART): Define if not already defined.
Include <inttypes.h>.
(PTRDIFF_MAX): Define if not already defined.
(TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Likewise.
(block_read): Accommodate ancient AIX hosts that set errno to EINTR
after uncaught SIGCONT.
(buffer_lcm): Return a reasonable size if the multiple is too large.
New arg LCM_MAX.  All callers changed.
2002-02-28 04:28:07 +00:00
Paul Eggert
a44befd50b (noinst_HEADERS): Add c-stack.h, exitfail.h.
(libdiffutils_a_SOURCES): Add c-stack.c, exitfail.c, quotesys.c.
(INCLUDES): Remove.
2002-02-28 04:28:07 +00:00
Paul Eggert
2e507ad1c0 Include exitfail.h.
(xalloc_exit_failure): Remove; subsumed by exit_failure.
All uses changed.
2002-02-28 04:28:07 +00:00
Paul Eggert
b89fe19666 (xalloc_exit_failure): Remove; subsumed by exit_failure. 2002-02-28 04:28:07 +00:00
Paul Eggert
8eb1bae700 Include "hard-locale.h".
(hard_locale): Ignore ENABLE_NLS, since we want to operate on
locales other than LC_MESSAGES.
2002-02-28 04:28:07 +00:00