| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
| |
(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.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|