| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
|
|
|
|
|
|
| |
(error): Remove.
(line_cmp): tolower -> _tolower
(xmalloc, xrealloc): Remove.
|
|
|
|
| |
(malloc, realloc): Remove unused declarations.
|
|
|
|
| |
(diffarg): Take advantage of cleaner xrealloc semantics.
|
|
|
|
|
|
|
|
| |
(slurp): Align buffer size to word size, in case malloc cares.
(find_and_hash_each_line): Don't invoke line_cmp if the length
differs and -i is in force. tolower -> _tolower; this speeds
up diff -i considerably under some hosts (e.g. Solaris 2.3).
Don't assume ISSPACE ('\n') is nonzero.
|
| |
|
|
|
|
|
| |
(xmalloc, xrealloc): Remove.
(fatal, perror_with_exit): Use `error'.
|
|
|
|
|
|
| |
(error): Change to GNU library standard. All callers changed.
(xmalloc_exit_failure): New variable. xmalloc and xrealloc are now taken
from GNU library. All `main' programs set this variable at the start.
|
|
|
|
| |
(add_regexp): Free storage on failure. Allocate storage all at one go.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
is turned off on hosts that are incompatible with Posix applications.
|
|
|
|
|
| |
(exists, letters): Omit if HAVE_TMPNAM.
(expand_name): Use filename_lastdirchar instead of strrchr.
|
|
|
|
| |
value.
|
|
|
|
| |
(private_tempnam): Specialize for sdiff to avoid portability problems.
|
|
|
|
|
| |
(PR_PROGRAM): Moved here from diff.h (old name was PR_FILE_NAME).
(begin_output): Use SYSTEM_QUOTE_ARG.
|
|
|
|
|
|
|
| |
(CTYPE_DOMAIN, ISDIGIT, ISPRINT, ISSPACE, ISUPPER): New macros that
work around common <ctype.h> problems.
(O_BINARY): Remove.
(SYSTEM_QUOTE_ARG): New macros.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
<ctype.h> now included by system.h.
(DEFAULT_EDITOR_PROGRAM): Renamed from DEFAULT_EDITOR for consistency.
(TMPDIR_ENV): New macro.
(expand_name): Change `isdir' to `is_dir' to avoid theoretical ctype
namespace contamination.
(main): Use SYSTEM_QUOTE_ARG.
(private_tempnam): Don't access "/tmp" directly; access it via PVT_tmpdir.
|
|
|
|
|
| |
(word): Don't define if already defined.
(read_files): Set mode to binary before returning 1.
|
| |
|
|
|
|
|
| |
(main): Give proper diagnostic if too many labels were given.
(read_diff): Use SYSTEM_QUOTE_ARG.
|
|
|
|
| |
(PR_FILE_NAME): Rename to PR_PROGRAM and move to Makefile.in, util.c.
|
| |
|
|
|
|
|
|
| |
(main): Use setmode, not open(..., O_BINARY); this hits stdin too.
Use NULL_DEVICE instead of "/dev/null".
(cmp): Use %lu instead of %ld when it is more likely to give correct output.
|
| |
|
| |
|
|
|
|
| |
Use HAVE_MEMCHR to test for all mem* routines.
|
|
|
|
|
|
|
| |
for common case of exact equality; the caller does that optimization now.
Optimize for the common case of mostly exact equality.
Use isupper/tolower instead of islower/toupper, for consistency.
(line_cmp, print_line): Use '\n' instead of line_end_char.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
(find_and_hash_each_line): Revamp to fix some inconsistencies with -b -w -i
and incomplete lines. Incomplete lines are now put into their own bucket.
This means line_cmp no longer needs line length arguments,
and equivalence classes' line length no longer need to include \n.
Invoke line_cmp only if memcmp fails and if ignore_some_line_changes.
(prepare_text_end): -B no lonter ignores missing newlines.
(read_files): Allocate another bucket for incomplete lines.
|
|
|
|
|
| |
(line_end_char): Removed; it wasn't being used consistently.
(line_cmp): Now takes just pointers to two lines.
|
|
|
|
| |
(ignore_some_line_changes): New variable; replaces `length_varies'.
|
| |
|
| |
|
|
|
|
|
| |
(usage): Just print usage; let caller worry about exiting.
(memchr, waitpid): Remove; use new substitutes instead.
|
|
|
|
| |
Change VOID_CLOSEDIR to CLOSEDIR_VOID for Autoconf 2.
|
|
|
|
|
| |
(usage): Just print usage; let caller worry about exiting.
(read_diff): Use new waitpid substitute.
|
|
|
|
|
|
| |
(usage): Just print usage; let caller worry about exiting.
(option_help): New variable.
(filetype): Add Posix.1b file types.
|
|
|
|
| |
(usage): Just print usage; let caller worry about exiting.
|
|
|
|
|
|
|
| |
If we'll have children, make sure SIGCHLD isn't ignored.
(read_diff): Use popen+pclose if !HAVE_FORK.
(DIFF_CHUNK_SIZE): Removed. We now get initial chunk size from STAT_BLOCKSIZE.
(INT_STRLEN_BOUND): New macro.
|
|
|
|
|
|
|
|
|
|
|
| |
(cleanup, main, waitpid): Use popen+pclose if !HAVE_FORK.
(edit): Use system if !HAVE_FORK.
(main): Call initialize_main first.
(execdiff): Now assumes caller has pushed all args, plus trailing 0.
All callers changed.
(trapsigs): If we'll have children, make sure SIGCHLD isn't ignored.
(private_tempnam): Try TMP if TMPDIR isn't defined.
Fit temporary filenames into 8.3 limit.
|
|
|
|
|
|
|
|
| |
(S_IXGRP, S_IXOTH, S_IXUSR): Remove unused macros.
(STAT_BLOCKSIZE): Don't define if already defined.
(min, max): Undef if already defined.
(filename_cmp, filename_lastdirchar, HAVE_FORK, HAVE_SETMODE, initialize_main
O_BINARY, same_file): New macros, for porting to non-Posix systems like DOS.
|
|
|
|
|
|
|
|
|
| |
(main, usage, compare_files): Support --binary option.
(main): Call initialize_main first.
If we'll have children, make sure SIGCHLD isn't ignored.
(compare_files): Use filename_cmp to compare file names.
Use filename_lastdirchar to find last directory char in a file name.
Use same_file to determine whether two files are the same.
|
| |
|
| |
|
| |
|