OpenBSD CVS

CVS log for src/usr.bin/diff/diffdir.c


[BACK] Up to [local] / src / usr.bin / diff

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.47 / (download) - annotate - [select for diffs], Fri Jan 25 00:19:26 2019 UTC (5 years, 3 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1, OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9, OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7, OPENBSD_6_6_BASE, OPENBSD_6_6, OPENBSD_6_5_BASE, OPENBSD_6_5, HEAD
Changes since 1.46: +2 -2 lines
Diff to previous 1.46 (colored)

I am retiring my old email address;  replace it with my OpenBSD one.

Revision 1.46 / (download) - annotate - [select for diffs], Mon Aug 28 15:33:27 2017 UTC (6 years, 8 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_6_4_BASE, OPENBSD_6_4, OPENBSD_6_3_BASE, OPENBSD_6_3, OPENBSD_6_2_BASE, OPENBSD_6_2
Changes since 1.45: +11 -7 lines
Diff to previous 1.45 (colored)

Fix exit value when diffing directories with missing files and the -N
or -P options are not used.  From Ibrahim Khalifa

Revision 1.45 / (download) - annotate - [select for diffs], Mon Oct 5 20:15:00 2015 UTC (8 years, 7 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_6_1_BASE, OPENBSD_6_1, OPENBSD_6_0_BASE, OPENBSD_6_0, OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.44: +2 -22 lines
Diff to previous 1.44 (colored)

Remove the non-standard -l flag that pipes the output through pr(1).
Based on a diff from and OK deraadt@

Revision 1.44 / (download) - annotate - [select for diffs], Fri Sep 25 16:16:26 2015 UTC (8 years, 7 months ago) by tedu
Branch: MAIN
Changes since 1.43: +5 -5 lines
Diff to previous 1.43 (colored)

xmalloc/free wrappers don't need to support 20 year old non comformance

Revision 1.43 / (download) - annotate - [select for diffs], Fri Jan 16 06:40:07 2015 UTC (9 years, 4 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8, OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.42: +5 -5 lines
Diff to previous 1.42 (colored)

Replace <sys/param.h> with <limits.h> and other less dirty headers where
possible.  Annotate <sys/param.h> lines with their current reasons.  Switch
to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc.  Change
MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where
sensible to avoid pulling in the pollution.  These are the files confirmed
through binary verification.
ok guenther, millert, doug (helped with the verification protocol)

Revision 1.42 / (download) - annotate - [select for diffs], Tue May 20 01:25:23 2014 UTC (10 years ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6
Changes since 1.41: +3 -3 lines
Diff to previous 1.41 (colored)

Use errc/warnc to simplify code.
Also, in 'ftp', always put the error message last, after the hostname/ipaddr.

ok jsing@ krw@ millert@

Revision 1.41 / (download) - annotate - [select for diffs], Thu Nov 29 02:15:44 2012 UTC (11 years, 5 months ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_5_5_BASE, OPENBSD_5_5, OPENBSD_5_4_BASE, OPENBSD_5_4, OPENBSD_5_3_BASE, OPENBSD_5_3
Changes since 1.40: +3 -3 lines
Diff to previous 1.40 (colored)

Change scandir()'s 'select' argument from
	int (*)(struct dirent *)
to
	int (*)(const struct dirent *)
to match POSIX.

ok millert@, ports check by naddy@

Revision 1.40 / (download) - annotate - [select for diffs], Sun Nov 14 18:24:43 2010 UTC (13 years, 6 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_5_2_BASE, OPENBSD_5_2, OPENBSD_5_1_BASE, OPENBSD_5_1, OPENBSD_5_0_BASE, OPENBSD_5_0, OPENBSD_4_9_BASE, OPENBSD_4_9
Changes since 1.39: +39 -42 lines
Diff to previous 1.39 (colored)

scandir() does not NULL-terminate the list of dirent structs so use
the returned count and set and end pointer instead.  we no longer
need to allocate a dummy array when diffing against a non-existent
directory so eliminate slurpdir() and call scandir() directly.
OK krw@

Revision 1.39 / (download) - annotate - [select for diffs], Mon Nov 8 15:49:13 2010 UTC (13 years, 6 months ago) by millert
Branch: MAIN
Changes since 1.38: +41 -115 lines
Diff to previous 1.38 (colored)

getdirentries(2) should be avoided outside of libc so use scandir(3)
instead.  This makes slurpdir() just a thin wrapper around scandir(3).
OK schwarze@

Revision 1.38 / (download) - annotate - [select for diffs], Thu Oct 28 15:02:41 2010 UTC (13 years, 6 months ago) by millert
Branch: MAIN
Changes since 1.37: +2 -2 lines
Diff to previous 1.37 (colored)

Change basep parameter of getdirentries() to be off_t *, not long *
so it works correctly with large offsets (and matches other systems).
This requires adding a new getdirentries syscall, with the old one
renamed to ogetdirentries.  All in-tree consumers of getdirentries()
have been updated.  Bump libc and libpthread major numbers.
OK and with deraadt@

Revision 1.37 / (download) - annotate - [select for diffs], Sat Jul 17 00:00:32 2010 UTC (13 years, 10 months ago) by ray
Branch: MAIN
CVS Tags: OPENBSD_4_8_BASE, OPENBSD_4_8
Changes since 1.36: +5 -3 lines
Diff to previous 1.36 (colored)

Plug memory leak.

OK nicm

Revision 1.36 / (download) - annotate - [select for diffs], Fri Jul 16 23:27:58 2010 UTC (13 years, 10 months ago) by ray
Branch: MAIN
Changes since 1.35: +2 -2 lines
Diff to previous 1.35 (colored)

Simplify print_status by removing NULL handling.

OK nicm

Revision 1.35 / (download) - annotate - [select for diffs], Tue Oct 27 23:59:37 2009 UTC (14 years, 6 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.34: +1 -5 lines
Diff to previous 1.34 (colored)

rcsid[] and sccsid[] and copyright[] are essentially unmaintained (and
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

Revision 1.34 / (download) - annotate - [select for diffs], Sun Jun 7 08:39:13 2009 UTC (14 years, 11 months ago) by ray
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE, OPENBSD_4_6
Changes since 1.33: +3 -3 lines
Diff to previous 1.33 (colored)

More cvs/diff/rcs convergence:
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

Revision 1.33 / (download) - annotate - [select for diffs], Sat Jun 6 15:37:28 2009 UTC (14 years, 11 months ago) by ray
Branch: MAIN
Changes since 1.32: +13 -11 lines
Diff to previous 1.32 (colored)

Oops, forgot to pass dflags to diffreg. Now the flags work again.

OK millert

Revision 1.32 / (download) - annotate - [select for diffs], Sat Jun 9 05:16:21 2007 UTC (16 years, 11 months ago) by ray
Branch: MAIN
CVS Tags: OPENBSD_4_5_BASE, OPENBSD_4_5, OPENBSD_4_4_BASE, OPENBSD_4_4, OPENBSD_4_3_BASE, OPENBSD_4_3, OPENBSD_4_2_BASE, OPENBSD_4_2
Changes since 1.31: +3 -3 lines
Diff to previous 1.31 (colored)

- Change sizeof(type) to sizeof(*ptr).
- Move function prototypes before variables.

No binary change.

OK otto and millert.

Revision 1.31 / (download) - annotate - [select for diffs], Tue May 29 18:24:56 2007 UTC (16 years, 11 months ago) by ray
Branch: MAIN
Changes since 1.30: +11 -10 lines
Diff to previous 1.30 (colored)

Bring in some changes from rcsdiff:
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@

Revision 1.30 / (download) - annotate - [select for diffs], Wed Jun 15 18:44:01 2005 UTC (18 years, 11 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_4_1_BASE, OPENBSD_4_1, OPENBSD_4_0_BASE, OPENBSD_4_0, OPENBSD_3_9_BASE, OPENBSD_3_9, OPENBSD_3_8_BASE, OPENBSD_3_8
Changes since 1.29: +4 -5 lines
Diff to previous 1.29 (colored)

bye bye whiteouts

Revision 1.29 / (download) - annotate - [select for diffs], Fri Nov 26 20:09:56 2004 UTC (19 years, 5 months ago) by otto
Branch: MAIN
CVS Tags: OPENBSD_3_7_BASE, OPENBSD_3_7
Changes since 1.28: +22 -15 lines
Diff to previous 1.28 (colored)

Fix the getdirentries() loop memory handling and EOF detection.
Also fix typo in sizeof.  Problem spotted by YAMAMOTO Takashi; this
diff joint work with millert@

ok millert@

Revision 1.28 / (download) - annotate - [select for diffs], Sat Oct 2 18:13:24 2004 UTC (19 years, 7 months ago) by millert
Branch: MAIN
Changes since 1.27: +22 -14 lines
Diff to previous 1.27 (colored)

Keep calling getdirentries() until we no longer fill up our buffer.

Revision 1.27 / (download) - annotate - [select for diffs], Tue Mar 16 00:40:34 2004 UTC (20 years, 2 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_6_BASE, OPENBSD_3_6, OPENBSD_3_5_BASE, OPENBSD_3_5
Changes since 1.26: +8 -3 lines
Diff to previous 1.26 (colored)

POSIX specifies that in directory mode device special files and
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@

Revision 1.26 / (download) - annotate - [select for diffs], Sun Nov 9 20:13:57 2003 UTC (20 years, 6 months ago) by otto
Branch: MAIN
Changes since 1.25: +3 -3 lines
Diff to previous 1.25 (colored)

Typos in comments from Jared Yanovich <jjy2+ at pitt dot edu>

Revision 1.25 / (download) - annotate - [select for diffs], Tue Oct 7 23:37:27 2003 UTC (20 years, 7 months ago) by millert
Branch: MAIN
Changes since 1.24: +4 -6 lines
Diff to previous 1.24 (colored)

Fix printing of "Only in foo" when foo is "/" (trailing slash removal
was overzealous in this case).  Fix tested by Hugo Villeneuve and myself.

Revision 1.24 / (download) - annotate - [select for diffs], Mon Jul 21 23:28:00 2003 UTC (20 years, 10 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_4_BASE, OPENBSD_3_4
Changes since 1.23: +5 -10 lines
Diff to previous 1.23 (colored)

Historically, the "Only in" messages produced in dir mode
were not printed when the output format was -e (ed) since this
prevented the output from being used as an ed script.
However, POSIX specifies that this message shall always be printed
regardless of the output format (this is also what GNU diff does).
Also do the same with the "Common subdirectory" message which
POSIX lists as optional.

Revision 1.23 / (download) - annotate - [select for diffs], Mon Jul 21 22:57:17 2003 UTC (20 years, 10 months ago) by millert
Branch: MAIN
Changes since 1.22: +6 -4 lines
Diff to previous 1.22 (colored)

Fix printing of status when not in -l mode which was broken when the
-l support was added.

Revision 1.22 / (download) - annotate - [select for diffs], Wed Jul 9 00:07:44 2003 UTC (20 years, 10 months ago) by millert
Branch: MAIN
Changes since 1.21: +27 -4 lines
Diff to previous 1.21 (colored)

Re-implement -l flag; diff -l now works correctly in non-directory
mode (like GNU diff).

Revision 1.21 / (download) - annotate - [select for diffs], Sun Jul 6 22:17:21 2003 UTC (20 years, 10 months ago) by millert
Branch: MAIN
Changes since 1.20: +4 -4 lines
Diff to previous 1.20 (colored)

Add -q option from GNU diff

Revision 1.20 / (download) - annotate - [select for diffs], Sun Jul 6 22:02:36 2003 UTC (20 years, 10 months ago) by millert
Branch: MAIN
Changes since 1.19: +14 -14 lines
Diff to previous 1.19 (colored)

Implement -P from GNU diff (like -N but only for files that are missing
from dir1).

Revision 1.19 / (download) - annotate - [select for diffs], Sun Jul 6 20:48:59 2003 UTC (20 years, 10 months ago) by millert
Branch: MAIN
Changes since 1.18: +235 -308 lines
Diff to previous 1.18 (colored)

Some fairly major changes:
 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@

Revision 1.18 / (download) - annotate - [select for diffs], Sun Jul 6 02:11:12 2003 UTC (20 years, 10 months ago) by millert
Branch: MAIN
Changes since 1.17: +5 -3 lines
Diff to previous 1.17 (colored)

Use symbolic constants for output format.

Revision 1.17 / (download) - annotate - [select for diffs], Fri Jul 4 17:50:24 2003 UTC (20 years, 10 months ago) by millert
Branch: MAIN
Changes since 1.16: +22 -111 lines
Diff to previous 1.16 (colored)

Kill non-standard -l option as discussed with tedu@

Revision 1.16 / (download) - annotate - [select for diffs], Fri Jul 4 02:54:36 2003 UTC (20 years, 10 months ago) by millert
Branch: MAIN
Changes since 1.15: +6 -7 lines
Diff to previous 1.15 (colored)

Some cosmetic fixes:
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

Revision 1.15 / (download) - annotate - [select for diffs], Fri Jun 27 20:28:13 2003 UTC (20 years, 10 months ago) by tedu
Branch: MAIN
Changes since 1.14: +4 -1 lines
Diff to previous 1.14 (colored)

-a to force ascii compare.  ok millert

Revision 1.14 / (download) - annotate - [select for diffs], Thu Jun 26 18:19:29 2003 UTC (20 years, 10 months ago) by millert
Branch: MAIN
Changes since 1.13: +12 -20 lines
Diff to previous 1.13 (colored)

Fix temp file handling.
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@

Revision 1.13 / (download) - annotate - [select for diffs], Wed Jun 25 22:14:43 2003 UTC (20 years, 10 months ago) by millert
Branch: MAIN
Changes since 1.12: +2 -2 lines
Diff to previous 1.12 (colored)

Add unidiff support and try to pretty up usage() a bit

Revision 1.12 / (download) - annotate - [select for diffs], Wed Jun 25 21:43:49 2003 UTC (20 years, 10 months ago) by millert
Branch: MAIN
Changes since 1.11: +30 -17 lines
Diff to previous 1.11 (colored)

o use S_ISDIR instead of doing it by hand
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

Revision 1.11 / (download) - annotate - [select for diffs], Wed Jun 25 17:49:22 2003 UTC (20 years, 10 months ago) by millert
Branch: MAIN
Changes since 1.10: +7 -11 lines
Diff to previous 1.10 (colored)

o use getopt()
o use err/warn
o only call done() when needed (after mkstemp)
o add "-C lines" like GNU grep
OK deraadt@

Revision 1.10 / (download) - annotate - [select for diffs], Wed Jun 25 03:50:27 2003 UTC (20 years, 10 months ago) by deraadt
Branch: MAIN
Changes since 1.9: +3 -2 lines
Diff to previous 1.9 (colored)

more knf

Revision 1.9 / (download) - annotate - [select for diffs], Wed Jun 25 03:44:49 2003 UTC (20 years, 10 months ago) by deraadt
Branch: MAIN
Changes since 1.8: +8 -11 lines
Diff to previous 1.8 (colored)

knf

Revision 1.8 / (download) - annotate - [select for diffs], Wed Jun 25 03:39:23 2003 UTC (20 years, 10 months ago) by tedu
Branch: MAIN
Changes since 1.7: +10 -5 lines
Diff to previous 1.7 (colored)

-Wstrict-prototypes

Revision 1.7 / (download) - annotate - [select for diffs], Wed Jun 25 03:37:32 2003 UTC (20 years, 10 months ago) by deraadt
Branch: MAIN
Changes since 1.6: +8 -8 lines
Diff to previous 1.6 (colored)

exit path signal race safe

Revision 1.6 / (download) - annotate - [select for diffs], Wed Jun 25 03:32:11 2003 UTC (20 years, 10 months ago) by deraadt
Branch: MAIN
Changes since 1.5: +2 -2 lines
Diff to previous 1.5 (colored)

fix lseek

Revision 1.5 / (download) - annotate - [select for diffs], Wed Jun 25 03:29:46 2003 UTC (20 years, 10 months ago) by deraadt
Branch: MAIN
Changes since 1.4: +3 -2 lines
Diff to previous 1.4 (colored)

snprintf

Revision 1.4 / (download) - annotate - [select for diffs], Wed Jun 25 03:25:29 2003 UTC (20 years, 10 months ago) by tedu
Branch: MAIN
Changes since 1.3: +7 -12 lines
Diff to previous 1.3 (colored)

more cast removal, and fix some indent(1) oddities

Revision 1.3 / (download) - annotate - [select for diffs], Wed Jun 25 03:02:33 2003 UTC (20 years, 10 months ago) by tedu
Branch: MAIN
Changes since 1.2: +94 -99 lines
Diff to previous 1.2 (colored)

cleanup.  ansi, headers, correct prototypes, some safer string and
tempfile functions, whitespace, ...
no functional improvements yet

Revision 1.2 / (download) - annotate - [select for diffs], Wed Jun 25 01:23:38 2003 UTC (20 years, 10 months ago) by deraadt
Branch: MAIN
Changes since 1.1: +36 -0 lines
Diff to previous 1.1 (colored)

caldera licenses

Revision 1.1 / (download) - annotate - [select for diffs], Wed Jun 25 01:20:52 2003 UTC (20 years, 10 months ago) by deraadt
Branch: MAIN

4.3reno diff.  This is free because of the Caldera license.  Nasty, but a
place to start.

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.