v2.7
(too_expensive): New variable, for heuristic to limit the worst-case 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.
(word): Don't define if already defined. (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.
Fix copyright notice.
Add comment.
<ctype.h> now included by system.h. (PR_FILE_NAME): Rename to PR_PROGRAM and move to Makefile.in, util.c.
(read_diff): If STAT_BLOCKSIZE yields zero, adjust it to a more reasonable value.
Add prototypes to function declarations.
isdigit -> ISDIGIT, etc.
isspace -> ISSPACE, etc. (word): Don't define if already defined. (read_files): Set mode to binary before returning 1.
Add prototypes to function declarations. (change_letter, print_number_range, find_change): Move decls to diff.h. (print_normal_hunk): Now static.
(private_tempnam): Use tmpnam if HAVE_TMPNAM; this simplifies porting. (exists, letters): Omit if HAVE_TMPNAM. (expand_name): Use filename_lastdirchar instead of strrchr.
isprint -> ISPRINT
(<sys/wait.h>, WEXITSTATUS): Use simpler scheme now that HAVE_SYS_WAIT_H is turned off on hosts that are incompatible with Posix applications.
(dir_file_pathname): Use filename_lastdirchar instead of strrchr.