summaryrefslogtreecommitdiff
path: root/usr.bin/diff
AgeCommit message (Collapse)Author
2007-09-11use strcspn to properly overwrite '\n' in fgets returned bufferGilles Chehade
ok pyr@, ray@, millert@, moritz@, chl@
2007-06-09- Change sizeof(type) to sizeof(*ptr).Ray Lai
- Move function prototypes before variables. No binary change. OK otto and millert.
2007-05-31convert to new .Dd format;Jason McIntyre
2007-05-30- use a consistent text for STANDARDSJason McIntyre
- note which options are extensions to POSIX
2007-05-29Bring in some changes from rcsdiff:Ray Lai
1. Replace all the e*alloc functions with the x*alloc versions. 2. Whitespace syncs according to style. 3. Remove the __inline stuff. 4. Remove the min/max functions, using the MAX/MIN macros instead. OK millert@
2007-03-18improve -p for C++ code: classes definition often haveMarc Espie
public:/protected:/private: at the start of line. This lets the -p scanner just take note of the section and keep looking for the actual class definition. Also increase function name bufsize so it shows most of these pesky C++ decls... okay otto@
2007-03-01sort options/synopsis/usage();Jason McIntyre
from Igor Sobrado
2007-02-23print the header only once.Marc Espie
okay millert@
2007-02-22Defer printing of the per-file diff header until after the regexpTodd C. Miller
"ignore" processing has finished. This way we only print the header for files that have diffs. The new behavior matches GNU diff (which is where the -I flag comes from). OK otto@ espie@
2006-05-05- no need to escape theseJason McIntyre
2006-02-22Append two string using strlcpy()/strlcat() instead of snprintf() toOtto Moerbeek
avoid having to check for encoding errors returned by snprintf(). From Ray Lai; ok millert@ jaredy@
2006-02-16Strip newline from lines used with -I, otherwise ^$ will match allOtto Moerbeek
lines and ignore them all. With and ok jaredy@
2005-12-27+.Xr sdiff 1 ,Jason McIntyre
2005-06-15bye bye whiteoutsTodd C. Miller
2005-01-13Handle all isspace() chars the same for -w and -b. ok millert@ markus@Otto Moerbeek
2005-01-06clarify what -a does;Jason McIntyre
prod and ok deraadt@
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-12-07advancing argv twice doesn't make it better.Marc Espie
okay otto@.
2004-11-27Use unsigned char for bytes that are fed to isxxx() functions, to improveOtto Moerbeek
portability. Spotted by YAMAMOTO Takashi. ok millert@
2004-11-26Fix the getdirentries() loop memory handling and EOF detection.Otto Moerbeek
Also fix typo in sizeof. Problem spotted by YAMAMOTO Takashi; this diff joint work with millert@ ok millert@
2004-10-20Change tabs in string constants to \t. "of course" deraadt@Otto Moerbeek
2004-10-02Keep calling getdirentries() until we no longer fill up our buffer.Todd C. Miller
2004-09-14use sizeof(struct cand) instead of defining an unused cand object, andTheo de Raadt
then doing sizeof(cand). silly kids
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-06-18If a new hunk immediately follows the previous one, merge themOtto Moerbeek
into a single hunk. This makes diff produce the same diff as gdiff in more cases. Found by brad@ and sturm@ using the ports tree. 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-25use new .St macro;Jason McIntyre
2004-01-07Document -p option. ok jmc@Otto Moerbeek
2004-01-07Implement -p option.Otto Moerbeek
"works here" millert@ ok miod@ deraadt@
2003-11-22Fix diff -q exit value which was broken in last commit.Todd C. Miller
2003-11-21Fix broken assumption that a file must contain differences if files_differ()Todd C. Miller
fails. Fixes "diff -i" exit value. Problem found by Claudio Jeker.
2003-11-10Din't print the "No newline at end of file" to inline (ie: to stdout)Todd C. Miller
for edit scripts. Instead, print it to stderr. This matches the GNU diff behavior and fixes a problem with RCS and files with no trailing newline. tedu@ OK
2003-11-09Typos in comments from Jared Yanovich <jjy2+ at pitt dot edu>Otto Moerbeek
2003-10-28prototype declared static, but function was not. add static to function.Anil Madhavapeddy
millert@ otto@ ok
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-09-18 - move `-d' to comparison options, rather then output optionsJason McIntyre
- note (again) that output options are mutually exclusive from Andy Isaacson (PR 3479)
2003-09-07Make -number be an error (similar to my change in grep.c); OK tedu@Todd C. Miller
2003-09-07 - add -P to SYNOPSISJason McIntyre
- remove "mutually exclusive" clause - -c produces 15 *'s, not a dozen - add -a to uage() - sync usage() with SYNOPSIS ok tedu@
2003-09-07try again at -u#. ok deraadt@Ted Unangst
2003-09-07correct ascii file test. ok deraadt@ pb@Ted Unangst
2003-09-06restore undocumented -u# support for the old schoolers. :)Ted Unangst
noticed by itojun@, ok deraadt@
2003-08-18fix spelling of --initial-tabDavid Krause
ok otto@
2003-08-13Based on what otto@ said on icb. The expensive thing in diff isTodd C. Miller
newcand() (this is what blows up the memory usage so badly). Instead of counting how many times we go through the loop, count how many times we called newcand(). I renamed loopcount -> numtries since it is no longer the number of loop runs. This fixes espie@'s regression. tedu@ OK
2003-08-08Guess the number of lines in a file and use that number for initialOtto Moerbeek
memory allocation. Initial version by me, cleanup by millert@. ok millert@
2003-08-01anychange is no longer extern; millert okTheo de Raadt
2003-07-31- Change the hash function to a simple multiplicative one. The oldOtto Moerbeek
hash function was apparently optimized for 16 bit processors and generates quite some collisions. - Fix another case of excessive reallocing. ok millert@
2003-07-31o correct exit code when comparing stdin and stdin (a noop)Todd C. Miller
o after copying to a temp file, lseek() to the beginning so the inline cmp routine works. Fixes an exit code issue when comparing against stdin.
2003-07-29cleanTheo de Raadt
2003-07-27We need to initialize clen to 0 each time through diffreg() forTodd C. Miller
when diffreg() is called multiple times (i.e. in directory mode). Fixes a hang I saw doing "diff -r" of two large directory trees.
2003-07-27Correct computation of argsize when setting diffargs.Todd C. Miller