summaryrefslogtreecommitdiffstats
path: root/usr.bin/diff/diff.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* restore RCS id removed in 1.33jcs2020-11-011-2/+2
|
* Remove the non-standard -l flag that pipes the output through pr(1).millert2015-10-051-10/+7
| | | | Based on a diff from and OK deraadt@
* More cvs/diff/rcs convergence:ray2009-06-071-2/+2
| | | | | | | | | | | 1. Mostly variable/function renaming, SIZE_T_MAX->SIZE_MAX, and spacing. 2. One strchr -> strncspn. 3. diff had a weird thing where it set file[12] = ofile[12] but never updated file or ofile, then if file and ofile were different it freed it. I removed it. OK millert
* Oops, forgot to pass dflags to diffreg. Now the flags work again.ray2009-06-061-2/+2
| | | | OK millert
* Pull changes from rcsdiff, similar to what was pulled into cvsdiff.ray2009-06-061-6/+16
| | | | OK millert
* If the -L option is specified twice, use it for the second filenamemillert2004-12-091-2/+2
| | | | like GNU diff does. Adapted from a diff by YAMAMOTO Takashi
* Implement -I option: ignore changes matching a set of regexes. Fromotto2004-06-201-2/+6
| | | | | Jared Yanovich, with twists from millert@ and me. Testing by brad@, sturm@ and pval@. ok millert@
* POSIX specifies that in directory mode device special files andmillert2004-03-161-1/+3
| | | | | | 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@
* Implement -p option.otto2004-01-071-3/+3
| | | | "works here" millert@ ok miod@ deraadt@
* Typos in comments from Jared Yanovich <jjy2+ at pitt dot edu>otto2003-11-091-2/+2
|
* Fix printing of "Only in foo" when foo is "/" (trailing slash removalmillert2003-10-071-1/+2
| | | | was overzealous in this case). Fix tested by Hugo Villeneuve and myself.
* anychange is no longer extern; millert okderaadt2003-08-011-2/+2
|
* - Use a heuristic to bound memory and cpu usage, at the cost ofotto2003-07-271-2/+2
| | | | | | | | | 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@
* Implement the -L and -T options from GNU diff.millert2003-07-221-3/+3
|
* POSIX-compliant output when there are two paths w/ the same name butmillert2003-07-211-3/+4
| | | | one is a file and the other is a directory in -r mode (cosmetic).
* Unlink temp file as soon as it is opened and return a FILE * formillert2003-07-091-8/+4
| | | | | | | | | | | 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
* Re-implement -l flag; diff -l now works correctly in non-directorymillert2003-07-091-3/+16
| | | | mode (like GNU diff).
* Add -q option from GNU diffmillert2003-07-061-1/+2
|
* Implement -P from GNU diff (like -N but only for files that are missingmillert2003-07-061-2/+2
| | | | from dir1).
* Some fairly major changes:millert2003-07-061-50/+43
| | | | | | | | | | | | | | | | | | | | | 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@
* Kill non-standard -l option as discussed with tedu@millert2003-07-041-2/+2
|
* Kill diff -h, we don't use or want diffh. Discussed w/ tedu@millert2003-07-041-2/+2
|
* Some cosmetic fixes:millert2003-07-041-3/+2
| | | | | | | | 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
* Remove cruft; We don't have the -I, -1 or -2 options anymore so we don'tmillert2003-06-261-2/+2
| | | | need the associated scaffolding. tedu@ OK
* Fix temp file handling.millert2003-06-261-1/+3
| | | | | | | | | 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@
* Fix temp file handling and deal with the case where we might need 2 temp files.millert2003-06-261-4/+4
|
* put all the flags and globals in diff.c, and declare externs in diff.htedu2003-06-261-57/+8
| | | | ok millert@
* o use S_ISDIR instead of doing it by handmillert2003-06-251-4/+3
| | | | | | | | 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
* o use getopt()millert2003-06-251-6/+9
| | | | | | | o use err/warn o only call done() when needed (after mkstemp) o add "-C lines" like GNU grep OK deraadt@
* remove silly signal catcher, and just use done. ok deraadt@tedu2003-06-251-2/+1
|
* exit path signal race safederaadt2003-06-251-2/+2
|
* cleanup. ansi, headers, correct prototypes, some safer string andtedu2003-06-251-5/+11
| | | | | tempfile functions, whitespace, ... no functional improvements yet
* caldera licensesderaadt2003-06-251-0/+36
|
* 4.3reno diff. This is free because of the Caldera license. Nasty, but aderaadt2003-06-251-0/+85
place to start.