| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
|
| |
|
|
|
|
| |
avoid a needless `stat' in that case.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use size_t, not int, when needed. Use STD{IN,OUT,ERR}_FILENO instead of [012].
(struct msg, msg_chain, msg_chain_end): Moved here from diff.h.
(message5): New function.
(pr_pid): New var.
(begin_output): Allocate `name' more precisely.
Put child pid into pr_pid, so that we can wait for it later.
Don't check execl's return value, since any return must be an error.
(finish_output): Detect and report output errors.
Use waitpid if available. Check pr exit status.
(line_cmp): Use locale's definition of white space
instead of using one hardwired defn for -b and another for -w.
(analyze_cmp): Avoid double negation with `! nontrivial'.
Pacify `gcc -Wall' be rewriting for-loop into do-while-loop.
(dir_file_pathname): New function.
|
|
|
|
|
|
|
|
|
| |
SEEK_SET, SEEK_CUR,
STDIN_FILENO, STDOUT_FILENO, STDERR_FILENO):
New macros, if system doesn't define them.
(volatile): Don't define if already defined.
(PARAMS): New macro.
(VOID): Move here from diff.h.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use `const' to pacify `gcc'. Use STD{IN,OUT,ERR}_FILENO instead of [012].
(SEEK_SET): Move to system.h.
(version_string): Now char[], not char*.
(private_tempnam): Remove hardcoded limit on temporary file names.
(exiterr, perror_fatal, main): When exiting because of a signal,
exit with that signal's status.
(lf_refill, main, skip_white, edit, interact): Check for signal.
(ignore_SIGINT): Renamed from `ignore_signals'.
(NUM_SIGS, initial_handler): New macros.
(initial_action, signal_received, sigs_trapped): New vars.
(catchsig, trapsigs): Use sigaction if possible, since this closes the
windows of vulnerability that `signal' has. Use RETSIGTYPE not void.
When a signal comes in, just set a global variable; this is safer.
(checksigs, untrapsig): New functions.
(edit): Pacify `gcc -Wall' with a useless assignment.
Respond to each empty line with help, not to every other empty line.
(private_tempnam): Remove hardcoded limit on temporary file name length.
Don't assume sizeof (pid_t) <= sizeof (int).
|
|
|
|
|
| |
(change_letter, print_number_range, find_change): Move decls to diff.h.
(print_normal_hunk): Now static.
|
|
|
|
|
|
|
| |
(line_cmp): Move declaration to diff.h.
(textchar): Remove.
(find_and_hash_each_line): Use locale's definition of white space
instead of using one hardwired defn for -b and another for -w.
|
| |
|
|
|
|
|
|
| |
Use `const' when needed to pacify gcc.
(struct dirdata): Rename `files' to `names' to avoid confusion
with external struct file_data `files'.
|
|
|
|
|
|
|
|
|
|
|
| |
Use `const' when needed to pacify gcc.
Use STD{IN,OUT,ERR}_FILENO instead of [012].
(VOID): Move to system.h.
(version_string): Now char[].
(usage): Sort options.
(process_diff): Pacify `gcc -Wall' with a useless assignment.
(read_diff): pid is of type pid_t, not int. Use waitpid if available.
(output_diff3): Simplify test for `\ No newline at end of file' message.
|
|
|
|
|
|
|
|
|
| |
Use `const' when needed to pacify gcc.
(Is_space, textchar): Remove.
(struct msg, msg_chain, msg_chain_end): Move to util.c.
(VOID): Move to system.h.
(line_cmp, version_string, change_letter, print_number_range,
find_change): New decls.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use `const' when needed to pacify gcc.
Use STD{IN,OUT,ERR}_FILENO instead of [012].
(usage): Sort options.
(filetype): New function.
(compare_files): Set stdin's st_mtime to be the current time.
Leave its name "-" instead of changing it to "Standard Input";
to test whether a file is stdin, we must compare its name to "-" instead
of its desc to 0, since if it's closed other file descs may be 0.
When comparing standard input to a file, and using a shortcut (e.g.
looking at file sizes or inode numbers), take the lseek offset into
account before deciding whether the files are identical.
Pretend that nonexistent files have the same filetype as existing files.
Rename `errorcount' to `failed', since it's boolean.
In directory comparisons, if a file is neither a regular file nor a
directory, just print its type and the other file's type.
|
|
|
|
|
|
| |
Use `const' when needed to pacify gcc.
(print_context_label): Standard input's st_mtime is no longer a special case
here, since `compare_files' now sets it to the current time.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use `const' when needed to pacify gcc. Use 0, not NULL, for portability.
Make globals static when possible.
(file): Now a 2-element array; replaces `file1' and `file2'.
(file_desc, buffer): Likewise, for file[12]_desc and buf[12].
(main): Likewise, for stat_buf[12]. Index these variables with `i'.
(ignore_initial): New var.
(long_options): Now const. Add `--ignore-initial'.
(usage): Sort options and add `--ignore-initial'.
(main, cmp): Add `--ignore-initial' support.
(main): `cmp - -' now succeeds. Use STD{IN,OUT,ERR}_FILENO instead of [012].
When comparing standard input to a file, and using a shortcut (e.g.
looking at file sizes or inode numbers), take the lseek offset into
account before deciding whether the files are identical.
Avoid mentioning `dev_t', `ino_t' for portability to nonstandard hosts.
Use l.c.m. of files' buffer sizes, not 8 * 1024.
ferror (stdout) does not imply errno has a useful value.
If 2nd file is "-", treat it first, in case stdin is closed.
(cmp): Always compute `char_number', `smaller' for speed and simplicity.
Say `cmp: EOF on input', not `/usr/gnu/bin/cmp: EOF on input',
as per Posix.2.
(block_compare_and_count): Increment line_number argument.
Remove end_char argument; it's always '\n'. All callers changed.
Do not assume sizeof(long) == 4; this isn't true on some 64-bit hosts.
(block_compare): Minimize differences with block_compare_and_count.
(block_read): Coalesce `bp += nread's.
(printc): Remove `FILE *' arg; output to stdout. All callers changed.
|
|
|
|
|
| |
(diag): Pacify `gcc -Wall' with a useless assignment.
(diff_2_files): Use l.c.m., not max, of files' buffer sizes.
|
|
|
|
|
| |
This was a file labeled diff3.c.new-notdone,
dated 1992-04-27, with user name `randy'.
|
| |
|
|
|
|
| |
traditional C.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
ignore_some_changes is nonzero, since the file size may differ
merely due to ignored changes.
(briefly_report): New function.
(main): Set ignore_some_changes if we might ignore some changes.
Remove unsystematic assignment of 0 to static vars.
|
|
|
|
| |
(main, usage, output_diff3): Add support for -T.
|
| |
|
|
|
|
| |
pretend the files are binary.
|
| |
|
|
|
|
| |
if all their differences are ignored.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|