summaryrefslogtreecommitdiff
path: root/usr.bin/diff3
AgeCommit message (Collapse)Author
2021-04-13Fix merging of files that lack a final \n at EOF after a block of common lines.Stefan Sperling
Problem reported by Josh Rickmar. ok millert@
2020-06-26Fix merging of files that lack newlines for diff(3), OpenRCS, and OpenCVS.Stefan Sperling
Merges with a file that lacks newlines (\n) were triggering a fatal error. This could be easily reproduced with merge(1) and diff3(1): $ echo foo > foo $ echo bar > bar $ echo -n baz > baz $ merge -p foo bar baz merge: failed to merge $ diff3 -E foo bar baz 1a ======= diff3prog: logic error $ Fix this by properly handling short reads from the third file argument. Only the third file argument triggered the problem. The other input files were already handled correctly. ok millert@
2019-09-28Add where missing and harmonize PATH to be _PATH_DEFPATH (without local norAntoine Jacoutot
X11R6). Suggested by tb@ ok deraadt@ tb@ millert@
2019-01-25I am retiring my old email address; replace it with my OpenBSD one.Todd C. Miller
2016-10-18Using bitwise OR along with two assignments in the conditional ofTodd C. Miller
a while() loop is a trap for the unwary programmer (albeit a clever trap). Break this up into two separate assignments and using boolean OR for clarity. OK otto@
2016-10-16Remove useless n=n assignment in the first parse of a for().Todd C. Miller
It was already removed from the rcs version by nicm@.
2015-10-09Change all tame callers to namechange to pledge(2).Theo de Raadt
2015-10-05tame "stdio rpath" or tame "stdio" suffices for all of these programs.Theo de Raadt
fairly easy to audit by running nm and noticing nothing beyond base stdio except for fopen/freopen. Then review all callpaths to those functions, and place the tame() calls. ok sthen
2015-09-05Add brackets to clarify assignments that are the result of a test operator.Jonathan Gray
ok deraadt@ looks correct millert@ jung@
2014-12-01trivial reallocarray() useTheo de Raadt
2013-11-15Include unistd.h as it is the standard location for getopt().Todd C. Miller
2012-03-04In preparation for getline and getdelim additions to libc, rename getline()Federico G. Schwindt
occurrences to get_line(). Based on a diff from Jan Klemkow <j-dot-klemkow-at-wemelug-dot-de> to tech.
2009-10-28rcsid[] and sccsid[] and copyright[] are essentially unmaintained (andTheo de Raadt
unmaintainable). these days, people use source. these id's do not provide any benefit, and do hurt the small install media (the 33,000 line diff is essentially mechanical) ok with the idea millert, ok dms
2008-02-27Properly check if temporary files have been successfully opened. If not,Tobias Stoeckmann
print error message on stderr (instead of stdout). ok millert, ray, tedu
2007-09-10Proper use of fseek/fseeko macros.Tobias Stoeckmann
OK joris@, otto@
2007-05-31convert to new .Dd format;Jason McIntyre
2006-02-22sort options + sync usage();Jason McIntyre
2006-01-28add -- after options, so files with leading - work.Ted Unangst
pr 4993 from jason.
2005-12-27+.Xr sdiff 1 ,Jason McIntyre
2005-11-22out-of-bounds access; ok otto@, millert@, deraadt@Markus Friedl
2005-08-01Use dynamic memory instead of a fixed table. Makes merges files withOtto Moerbeek
lots of changes possible. While there, kill an off-by-one. Report and testing by Alexander Bluhm. ok millert@
2005-03-30Use fgetln() to read lines so we are not limited to an arbitrarily smallTodd C. Miller
line length. OK otto@
2004-07-07- add shell prompt to command exampleJared Yanovich
- fix location of real diff3prog ok jmc@ otto@
2004-01-07Correctly test for cases where one file is different, and the other hasCan Erkin Acar
no more changes. ok millert@
2003-11-09Typos in comments from Jared Yanovich <jjy2+ at pitt dot edu>Otto Moerbeek
2003-10-24dont compare int to NULL, millert@ okAnil Madhavapeddy
2003-10-24- fix rcs Xr; from Jared YanovichJason McIntyre
- correct order for sections - remove unnecessary .Pp and -compact from display - kill some double spacing - sort SEE ALSO
2003-07-31Fix botched conversion to getopts; markus@Todd C. Miller
2003-07-22Install diff3.ksh with the correct name; noticed by TheoTodd C. Miller
2003-07-14knfTheo de Raadt
2003-07-10A matching diff3 from 32V w/ some UCB changes. I cleaned this up a bitTodd C. Miller
(KNF and -Wall) and rewrote the shell front-end.