summaryrefslogtreecommitdiff
path: root/usr.bin/diff/diff.h
AgeCommit message (Collapse)Author
2004-12-09If the -L option is specified twice, use it for the second filenameTodd C. Miller
like GNU diff does. Adapted from a diff by YAMAMOTO Takashi
2004-06-20Implement -I option: ignore changes matching a set of regexes. FromOtto Moerbeek
Jared Yanovich, with twists from millert@ and me. Testing by brad@, sturm@ and pval@. ok millert@
2004-03-16POSIX specifies that in directory mode device special files andTodd C. Miller
FIFOs shall be skipped. Other types of files may be skipped too (this is implementation-dependent). In directory mode, just skip anything that is not a regular file or directory. OK tedu@
2004-01-07Implement -p option.Otto Moerbeek
"works here" millert@ ok miod@ deraadt@
2003-11-09Typos in comments from Jared Yanovich <jjy2+ at pitt dot edu>Otto Moerbeek
2003-10-07Fix printing of "Only in foo" when foo is "/" (trailing slash removalTodd C. Miller
was overzealous in this case). Fix tested by Hugo Villeneuve and myself.
2003-08-01anychange is no longer extern; millert okTheo de Raadt
2003-07-27- Use a heuristic to bound memory and cpu usage, at the cost ofOtto Moerbeek
producing suboptimal diffs for large file containing lots of changes. Switch heuristic off with -d/--minimal (GNU compatible). Some hints from millert@. - Improve performance by reducing the number of realloc(3) calls. ok millert@ tedu@
2003-07-22Implement the -L and -T options from GNU diff.Todd C. Miller
2003-07-21POSIX-compliant output when there are two paths w/ the same name butTodd C. Miller
one is a file and the other is a directory in -r mode (cosmetic).
2003-07-09Unlink temp file as soon as it is opened and return a FILE * forTodd C. Miller
it so we don't have to worry about cleanup. This means the quit() signal handler and error/errorx can go away too. Move splice() out of diffreg() and into diff.c where it belongs since we don't want to be calling splice() for a directory diff. Add a check for mismatched paths (one file, one dir) in diffreg.c. deraadt@ OK
2003-07-09Re-implement -l flag; diff -l now works correctly in non-directoryTodd C. Miller
mode (like GNU diff).
2003-07-06Add -q option from GNU diffTodd C. Miller
2003-07-06Implement -P from GNU diff (like -N but only for files that are missingTodd C. Miller
from dir1).
2003-07-06Some fairly major changes:Todd C. Miller
o -N is implemented o -X is implemented o -x is implemented o diff.c has been rewritten and GNU long options are now supported o diffdir.c has been rewritten + no longer does fork + exec of /usr/bin/diff + can be called recursively (and will be for -r) o diff.h + don't include any .h files here any more, do it in the .c files + no Bell Labs code in this, gets a UCB copyright (the 32v sources only have a diff.c and there is nothing in common). o diffreg.c + most all remaining globals are now private to diffreg.c + files are only opened once + dynamically allocated objects are either freed or realloced + added missing UCB copyright (there were lots of UCB changes) + print correct thing when -s is specified OK deraadt@
2003-07-04Kill non-standard -l option as discussed with tedu@Todd C. Miller
2003-07-04Kill diff -h, we don't use or want diffh. Discussed w/ tedu@Todd C. Miller
2003-07-04Some cosmetic fixes:Todd C. Miller
o get rid of now-unused tempfile variable o move inifdef into diffreg.c (only used there) o correct a comment o use _PATH_DIFF, _PATH_DIFFH and _PATH_PR instead of variables set to them o get rid of hack to look for pr and diff in /bin
2003-06-26Remove cruft; We don't have the -I, -1 or -2 options anymore so we don'tTodd C. Miller
need the associated scaffolding. tedu@ OK
2003-06-26Fix temp file handling.Todd C. Miller
o honor TMPDIR environment variable as per man page o need 2 temp files if both file1 and file2 are devices o add error() and errorx() which cleanup temp file and then call err() and errx() respectively. OK tedu@
2003-06-26Fix temp file handling and deal with the case where we might need 2 temp files.Todd C. Miller
2003-06-26put all the flags and globals in diff.c, and declare externs in diff.hTed Unangst
ok millert@
2003-06-25o use S_ISDIR instead of doing it by handTodd C. Miller
o rename talloc -> emalloc and ralloc -> erealloc o struct direct -> struct dirent (POSIX) o kill remaining strcpy() o fix unterminated string in setfile() deraadt@ OK
2003-06-25o use getopt()Todd C. Miller
o use err/warn o only call done() when needed (after mkstemp) o add "-C lines" like GNU grep OK deraadt@
2003-06-25remove silly signal catcher, and just use done. ok deraadt@Ted Unangst
2003-06-25exit path signal race safeTheo de Raadt
2003-06-25cleanup. ansi, headers, correct prototypes, some safer string andTed Unangst
tempfile functions, whitespace, ... no functional improvements yet
2003-06-25caldera licensesTheo de Raadt
2003-06-254.3reno diff. This is free because of the Caldera license. Nasty, but aTheo de Raadt
place to start.