summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* (diff_2_files): Use memcmp instead of bcmp.Paul Eggert1993-09-131-6/+6
|
* GNU diffutils 2.6Paul Eggert1993-09-131-4/+4
|
* (compare_files): Two files with the same name must be the same file;Paul Eggert1993-09-031-1/+6
| | | | avoid a needless `stat' in that case.
* Add prototypes to function declarations. Use `const' to pacify `gcc'.Paul Eggert1993-08-271-97/+138
| | | | | | | | | | | | | | | | | 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.
* (S_IXOTH, S_IXGRP, S_IXUSR,Paul Eggert1993-08-271-0/+38
| | | | | | | | | 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.
* Add prototypes to function declarations. Use `const' to pacify `gcc'.Paul Eggert1993-08-271-23/+24
|
* Add prototypes to function declarations. Use size_t, not int, when needed.Paul Eggert1993-08-271-95/+223
| | | | | | | | | | | | | | | | | | | | | 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).
* Add prototypes to function declarations.Paul Eggert1993-08-271-6/+3
| | | | | (change_letter, print_number_range, find_change): Move decls to diff.h. (print_normal_hunk): Now static.
* Add prototypes to function declarations. Use size_t, not int, when needed.Paul Eggert1993-08-271-85/+49
| | | | | | | (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.
* Add prototypes to function declarations.Paul Eggert1993-08-272-21/+15
|
* Add prototypes to function declarations. Use size_t, not int, when needed.Paul Eggert1993-08-271-37/+39
| | | | | | Use `const' when needed to pacify gcc. (struct dirdata): Rename `files' to `names' to avoid confusion with external struct file_data `files'.
* Add prototypes to function declarations. Use size_t, not int, when needed.Paul Eggert1993-08-271-741/+674
| | | | | | | | | | | 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.
* Add prototypes to function declarations. Use size_t, not int, when needed.Paul Eggert1993-08-271-66/+75
| | | | | | | | | 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.
* Add prototypes to function declarations. Use size_t, not int, when needed.Paul Eggert1993-08-271-91/+161
| | | | | | | | | | | | | | | | | | 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.
* Add prototypes to function declarations. Use size_t, not int, when needed.Paul Eggert1993-08-271-28/+30
| | | | | | 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.
* Add prototypes to function declarations. Use size_t, not int, when needed.Paul Eggert1993-08-271-259/+282
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Add prototypes to function declarations. Use size_t, not int, when needed.Paul Eggert1993-08-271-30/+30
| | | | | (diag): Pacify `gcc -Wall' with a useless assignment. (diff_2_files): Use l.c.m., not max, of files' buffer sizes.
* Attempt to do a better job with three two-way diffs.Paul Eggert1993-07-041-589/+649
| | | | | This was a file labeled diff3.c.new-notdone, dated 1992-04-27, with user name `randy'.
* Change NULL to 0.Paul Eggert1993-05-261-5/+5
|
* (print_sdiff_common_lines_print_sdiff_hunk): Cast args to pointer types, for ↵Paul Eggert1993-05-261-4/+4
| | | | traditional C.
* (longopts, private_tempnam): Change NULL to 0.Paul Eggert1993-05-261-25/+25
|
* (longopts): Change NULL to 0.Paul Eggert1993-05-261-10/+10
|
* (main): Cast args to compare_files, for traditional C.Paul Eggert1993-05-261-1/+2
|
* (diff_2_files): Change NULL to 0.Paul Eggert1993-05-261-1/+1
|
* (compare_files): Don't use the file size shortcut ifPaul Eggert1993-05-251-24/+7
| | | | | | | | 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.
* (tab_align_flag): New variable, for new -T option.Paul Eggert1993-05-251-4/+13
| | | | (main, usage, output_diff3): Add support for -T.
* entered into RCSRichard M. Stallman1993-05-231-0/+1
|
* (read_files): New argument PRETEND_BINARY says whether toPaul Eggert1993-05-221-4/+6
| | | | pretend the files are binary.
* (ignore_some_changes): New variable.Paul Eggert1993-05-221-0/+4
|
* (diff_2_files): With -q, do not report that files differPaul Eggert1993-05-221-51/+66
| | | | if all their differences are ignored.
* entered into RCSPaul Eggert1993-05-212-1/+2
|
* entered into RCSPaul Eggert1993-04-233-13/+33
|
* *** empty log message ***Paul Eggert1993-04-231-1/+8
|
* *** empty log message ***Roland McGrath1993-03-221-0/+6
|
* *** empty log message ***Richard M. Stallman1993-03-051-45/+130
|
* *** empty log message ***Roland McGrath1993-02-251-21/+38
|
* *** empty log message ***Richard M. Stallman1993-02-221-4/+6
|
* *** empty log message ***Richard M. Stallman1993-02-211-1/+1
|
* *** empty log message ***Richard M. Stallman1993-02-111-2/+2
|
* entered into RCSRichard M. Stallman1993-02-111-1/+5
|
* *** empty log message ***Richard M. Stallman1993-02-111-0/+4
|
* entered into RCSPaul Eggert1993-01-311-1/+1
|
* *** empty log message ***Paul Eggert1993-01-081-12/+17
|
* *** empty log message ***Paul Eggert1992-11-231-3/+5
|
* *** empty log message ***Paul Eggert1992-11-181-125/+115
|
* *** empty log message ***Paul Eggert1992-11-171-5/+8
|
* entered into RCSPaul Eggert1992-11-121-6/+2
|
* *** empty log message ***Paul Eggert1992-11-121-1/+1
|
* *** empty log message ***Paul Eggert1992-11-093-573/+677
|
* entered into RCSPaul Eggert1992-10-191-3/+3
|