summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* (main): Call initialize_main first.Paul Eggert1994-09-011-7/+6
| | | | | Use filename_cmp to compare file names. Use same_file to determine whether two files are the same.
* (compare_names, diff_dirs): Use filename_cmp to compare file names.Paul Eggert1994-09-011-5/+6
|
* (format_group, groups_letter_value): Use * instead of [] in prototypes.Paul Eggert1994-09-011-5/+5
|
* (word): Change from typedef to #define, to avoid collision withPaul Eggert1994-06-172-2/+2
| | | | Unicos 8.0 <sys/types.h>, which also typedefs `word'.
* (print_number_range): Don't rely on promotion to make the old-style parameterPaul Eggert1994-04-151-1/+1
| | | | | type agree with the prototype parameter type; this doesn't work on Apollos running bsd4.3.
* (scan_diff_line): Don't rely on promotion to make the old-style parameterPaul Eggert1994-04-151-2/+2
| | | | | type agree with the prototype parameter type; this doesn't work on Apollos running bsd4.3.
* diffutils 2.6Paul Eggert1993-12-131-3/+3
|
* (main): allow -p -u.Paul Eggert1993-12-031-1/+5
|
* (xmalloc, xrealloc): "virtual memory" -> "memory"Paul Eggert1993-11-101-2/+2
|
* (usage): Send usage to stdout, not stderr.Paul Eggert1993-11-101-23/+21
| | | | | (long_options, main, usage): Add `--help'. (main): Send version number to stdout, not stderr. Exit afterwards.
* (word): Change to `int'; it makes a big difference on x86.Paul Eggert1993-11-101-22/+22
| | | | | | | (sip, slurp): Put off allocating room to hold the whole file until we have to read the whole file. This wins if the file turns out to be binary. (primes): Omit large primes if INT_MAX is small.
* (usage): Send usage to stdout, not stderr.Paul Eggert1993-11-101-15/+27
| | | | | (long_options, main, usage): Add `--help'. (read_diff): Detect integer overflow in buffer size calculations.
* (long_options, main, usage): Add `--help'.Paul Eggert1993-11-101-17/+24
| | | | | | (main): Send version number to stdout, not stderr. (usage): Send usage to stdout, not stderr. (compare_files): Initialize `inf' properly.
* (word): New type. All uses of `long' for word-at-a-time comparisonsPaul Eggert1993-11-101-43/+47
| | | | | | | changed to `word'. (long_options, main, usage): Add `--help'. (usage): Send usage to stdout, not stderr. (main): Add `-v'. Send version number to stdout, not stderr.
* (too_expensive): New variable, for heuristic to limit the worst-casePaul Eggert1993-11-101-121/+245
| | | | | | | | | | | | | cost to O(N**1.5 log N) at the price of producing suboptimal output for large inputs with many differences. (diff_2_files): Initialize it. (struct partition): New type. (SNAKE_LIMIT): New macro; merely documents already-used number 20. (diag): New `minimal' arg; all callers changed. Put results into struct partition. Apply `too_expensive' heuristic. Tune. (compareseq): New `minimal' arg; all callers changed. Tune. (shift_boundaries): Improve heuristic to also coalesce adjacent runs of changes more often.
* (memchr): Make first arg char const *Paul Eggert1993-09-271-4/+4
| | | | | | to match standard. (xmalloc, xrealloc): Cast malloc, realloc to (VOID *) to suppress bogus warnings on some nonstandard hosts.
* (malloc, realloc): Declare only if !HAVE_STDLIB_H.Paul Eggert1993-09-271-8/+4
| | | | | (memchr): Declare only if !HAVE_MEMCHR. These changes are needed to keep some nonstandard hosts happy.
* (xmalloc, xrealloc): Cast malloc, reallocPaul Eggert1993-09-271-6/+6
| | | | | | | | to (VOID *) to suppress bogus warnings on some nonstandard hosts. (lf_copy, lf_skip, lf_snarf): Cast memchr to (char *) to suppress bogus warnings on some nonstandard hosts. (memchr): Make first arg char const * to match standard.
* (xmalloc, xrealloc): Cast malloc, reallocPaul Eggert1993-09-271-2/+2
| | | | to (VOID *) to suppress bogus warnings on some nonstandard hosts.
* (add_exclude_file): Cast memchr to (char *)Paul Eggert1993-09-271-1/+1
| | | | to suppress bogus warnings on some nonstandard hosts.
* (main, usage, version_string): Add --version option.Paul Eggert1993-09-271-2/+9
|
* (diff_2_files): Work around memcmp bug with size=0.Paul Eggert1993-09-271-3/+4
|
* (output_1_line): Use isprint, since some hosts lack isgraph.Paul Eggert1993-09-181-4/+4
| | | | | Ensure that its argument isn't negative. (xmalloc, xrealloc): Remove needless casts.
* (volatile, const): Define these before including any system headers,Paul Eggert1993-09-181-9/+36
| | | | | | | | so that they're used consistently in all system includes. (S_IS{BLK,CHR,DIR,FIFO,REG,SOCK}): Fix defns if STAT_MACROS_BROKEN. (getenv, malloc, realloc): Declare even if HAVE_STDLIB_H, since some <stdlib.h>s don't declare them. (memchr): Likewise for <string.h>.
* Include "system.h" first.Paul Eggert1993-09-181-2/+2
| | | | (xmalloc): Make defn static, like declaration.
* Include "system.h" first.Paul Eggert1993-09-181-8/+8
| | | | | | (xmalloc): Now static. (xmalloc, realloc): Remove needless casts. (READNUM): Ensure isdigit argument isn't negative.
* Remove redundant "system.h" inclusion.Paul Eggert1993-09-181-1/+0
|
* Include "system.h" first.Paul Eggert1993-09-181-1/+1
|
* (discard_confusing_lines): Make defn static, like declaration.Paul Eggert1993-09-181-1/+1
|
* GNU diffutils 2.6Paul Eggert1993-09-171-3/+5
|
* GNU diffutils 2.6Paul Eggert1993-09-171-1/+1
|
* GNU diffutils 2.6Paul Eggert1993-09-171-1/+1
|
* #include <config.h>, not "config.h", to allowPaul Eggert1993-09-151-1/+1
| | | | | configuring in a separate directory when the source directory has already been configured.
* (scan_char_literal): New function, for new %c'x' andPaul Eggert1993-09-151-49/+102
| | | | | %c'\ooo' format specs. (format_group, print_ifdef_lines): Use it. Remove %0 format spec.
* (cmp): Don't try to read past end of file; this doesn'tPaul Eggert1993-09-151-2/+3
| | | | work on ttys.
* (line_cmp): bcmp -> memcmpPaul Eggert1993-09-131-4/+4
|
* (PARAMS, VOID): Define earlier so that malloc decl can use VOID.Paul Eggert1993-09-131-49/+44
| | | | | | | | (STAT_BLOCKSIZE): Simplify ersatz defn; just use 8K. (dirent): Renamed from direct; dirent makes the code more standard. <limits.h>, <stdlib.h>, <string.h>: Include only if corresponding HAVE_*_H. (memcmp, memcpy, strchr, strrchr): Prefer these standard names to traditional names.
* (expand_name): rindex -> strrchrPaul Eggert1993-09-131-6/+6
| | | | | (expand_name, lf_snarf): bcopy -> memcpy (interact): index -> strchr
* (struct group): New struct.Paul Eggert1993-09-131-76/+267
| | | | | | | | | | | | (print_ifdef_lines): Use it to simplify argument passing. Remove the convention that last arg -1 signifies that the lines from file 2 are the same as the lines from file 1; this convention no longer works, now that line numbers might be printed out, since the line's numbers may differ. Add first FILE * argument to output to. All callers changed. Use a faster test for the single-fwrite optimization. Add support for %?c, %(A=B?T:E), PRINTF_SPECn formats. (format_group, scan_printf_spec, groups_letter_value): New functions. (format_ifdef): 1st arg is no longer const pointer.
* (copy_stringlist, compare_line_list): bcmp -> memcmpPaul Eggert1993-09-131-5/+5
|
* (group_format, line_format): No longer const pointers.Paul Eggert1993-09-131-4/+4
|
* (main, longopts): Add --line-format=FORMAT option.Paul Eggert1993-09-131-29/+33
| | | | | (specify_format): Args no longer const pointers. All callers changed. (compare_files): rindex -> strrchr.
* (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.