(usage): Reformat messages to ease translation.
(handler_index_of_SIGINT, handler_index_of_SIGPIPE):
New macros.
(main): Do not confuse signal numbers with their indices.
Bug reported by Bruno Haible.
(edit): Cat lin to long before printing with %ld, since lin might
be narrow than long.
(struct dirdata): New member nnames.
(locale_specific_sorting, failed_strcoll): New vars.
(dir_read): Renamed from dir_sort. Don't sort the dir.
Set new nnames member of struct dirdata. All callers changed.
(compare_names): Don't check for errno after strcasecmp.
Use strcoll only if locale_specific_sorting is nonzero.
If strcoll fails, longjmp out rather than returning a value
that might result in an invalid comparison function that might
make qsort dump core.
(diff_dirs): Sort the directory ourselves. Use setjmp to recover
from strcoll failure, falling back on native byte comparison.
Make local variables volatile if they need to preserve their value
after setjmp/longjmp.
(bytes, parse_ignore_initial, cmp): Use UINTMAX_MAX
instead of (uintmax_t) -1, to avoid warnings on some compilers.
(usage): Reformat messages to ease translation.
* The test-version environment variables DIFF_OPTIONS and DIFF_PROGRAM
have been withdrawn, as they caused compatibility problems.
You can use aliases or shell script wrappers instead.
failure on its own. Set errno to 0 before invoking popen.
(finish_output): Report errno on pclose failure.
Distinguish between subsidiary program not found, and failure.
(DIFF_PROGRAM_OPTION): New constant.
(longopts, option_help_msgid, main): Add --diff-program=PROGRAM.
(check_stdout): New function.
(main): Remove DIFF_PROGRAM support. Check stdout after printing version.
Use check_stdout after printing help. Use execvp/perror_fatail rather
than execdiff. Set errno to 0 before invoking popen.
Check for pclose failure properly.
(main, edit): If child exec fails, exit with 127 rather than trying to
print diagnostic.
Distinguish between subsidiary program failing and not being found.
(edit): Handle signals the same way, regardless of whether we're using
system or fork+exec. Check for system returning -1.
(longopts, main): Use them.
(longopts, main, option_help_msgid): New option --diff-option=PROGRAM.
(main): Remove DIFF_PROGRAM support.
Check stdout after printing version.
(check_stdout): Report errno info if fclose fails.
(read_diff): Have child exit with status 127 when program is not found,
rather than trying to have the child report failure. CHeck for
pclose returning -1.
(main): Use 130 instead of DEFAULT_WIDTH, since it's not really
builder-settable. Do not prepend DIFF_OPTIONS.
(check-stdout): If fclose (stdout) fails, print errno info.
(option_help_msgid): Default context is 3, not 2.
(usage): Work even if ptrdiff_t is wider than int.
is assumed to modify the integer 1. Index terms like "kibibyte".
Document plain "k".
(Reporting Bugs): Mention bug-report archive and test version
location. Ask for "diff --version" in bug reports.
(expand_name): Use base_name rather than file_name_lastdirchar, for
portability to DOS.
(main): Initialize xalloc_exit_failure before possibly invoking any memory
allocator.
(main): Later values and/or styles now silently override earlier.
(specify_value, specify_style): Likewise. All callers changed. Remove.
(binary, main, option_help_msgid, compare_files):
HAVE_SETMODE -> HAVE_SETMODE_DOS.
(NO_IGNORE_FILE_NAME_CASE_OPTION): New constant.
(longopts, main, option_help_msgid): Support it.
(exclude_options): New function.
(main): Use it. Initialize xalloc_exit_failure before potentially
allocating memory.
(filetype): Distinguish executable files from others, as POSIX suggests.
(compare_files): Use base_name instead of file_name_lastdirchar.
(hard_locale_LC_MESSAGES): New macro.
(sprintc): Remove int width arg; it's now the caller's responsibility to pad.
All callers changed.
(stat_buf): New static var; was formerly a local var in 'main'.
(valid_suffixes): Add 'K', for 'KiB'.
(option_help_msgid): Don't confuse bytes with characters.
(main): Set xalloc_exit_failure before invoking anything that might
allocate memory. Fix bug: -n was incorrectly ignored when optimizing
the case of regular files with different lengths.
(cmp): Use an index column wide enough to store this comparison's indexes.
In locales other than the POSIX locale, say "byte" rather than "char".
(PR_PROGRAM): Use AC_DEFINE_UNQUOTED, so that $PR_PROGRAM is expanded by sh.
(ptrdiff_t, ssize_t): Use AC_CHECK_TYPE with a default of int,
not AC_CHECK_TYPES.
(jm_AC_DOS, AC_FUNC_SETMODE_DOS): New macros.
(AC_CONFIG_FILES): Add ms/Makefile.