OpenBSD CVS

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


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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.40 / (download) - annotate - [select for diffs], Fri Jun 28 13:35:03 2019 UTC (4 years, 10 months ago) by deraadt
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, HEAD
Changes since 1.39: +4 -4 lines
Diff to previous 1.39 (colored)

When system calls indicate an error they return -1, not some arbitrary
value < 0.  errno is only updated in this case.  Change all (most?)
callers of syscalls to follow this better, and let's see if this strictness
helps us in the future.

Revision 1.39 / (download) - annotate - [select for diffs], Sun Oct 16 13:35:51 2016 UTC (7 years, 7 months ago) by okan
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5, OPENBSD_6_4_BASE, OPENBSD_6_4, OPENBSD_6_3_BASE, OPENBSD_6_3, OPENBSD_6_2_BASE, OPENBSD_6_2, OPENBSD_6_1_BASE, OPENBSD_6_1
Changes since 1.38: +3 -3 lines
Diff to previous 1.38 (colored)

Quiet compiler warnings; as applied to usr.bin/cvs by millert@

ok millert@

Revision 1.38 / (download) - annotate - [select for diffs], Sat Jun 13 20:15:21 2015 UTC (8 years, 11 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_0_BASE, OPENBSD_6_0, OPENBSD_5_9_BASE, OPENBSD_5_9, OPENBSD_5_8_BASE, OPENBSD_5_8
Changes since 1.37: +9 -8 lines
Diff to previous 1.37 (colored)

Convert xfree to free. From Fritjof Bornebusch. ok deraadt

Revision 1.37 / (download) - annotate - [select for diffs], Fri Jan 16 06:40:11 2015 UTC (9 years, 4 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.36: +15 -11 lines
Diff to previous 1.36 (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.36 / (download) - annotate - [select for diffs], Mon Dec 1 21:58:46 2014 UTC (9 years, 5 months ago) by deraadt
Branch: MAIN
Changes since 1.35: +9 -9 lines
Diff to previous 1.35 (colored)

An internal function called xrealloc() is actually a fail-hard
reallocarray()... so rename it.

Revision 1.35 / (download) - annotate - [select for diffs], Fri Oct 10 08:15:25 2014 UTC (9 years, 7 months ago) by otto
Branch: MAIN
Changes since 1.34: +2 -2 lines
Diff to previous 1.34 (colored)

Zap some stored values never read; From Fritjof Bornebusch; ok nicm@

Revision 1.34 / (download) - annotate - [select for diffs], Thu May 16 12:44:48 2013 UTC (11 years ago) by stsp
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6, OPENBSD_5_5_BASE, OPENBSD_5_5, OPENBSD_5_4_BASE, OPENBSD_5_4
Changes since 1.33: +3 -6 lines
Diff to previous 1.33 (colored)

Switch rcsdiff(1) binary file detection from !(isprint() || isspace()) to
checking for embedded NULs, as was done for grep(1) and diff(1) some time ago.
Avoids problems with e.g. latin1-encoded files being treated as binary, since
isprint() uses only ASCII by default and rcsdiff(1) doesn't call setlocale().
ok sthen

Revision 1.33 / (download) - annotate - [select for diffs], Wed Apr 20 19:34:16 2011 UTC (13 years, 1 month ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_3_BASE, OPENBSD_5_3, OPENBSD_5_2_BASE, OPENBSD_5_2, OPENBSD_5_1_BASE, OPENBSD_5_1, OPENBSD_5_0_BASE, OPENBSD_5_0
Changes since 1.32: +1 -2 lines
Diff to previous 1.32 (colored)

Remove some unneeded includes and dead code, from Michael W Bombardieri.

ok jasper xsa

Revision 1.32 / (download) - annotate - [select for diffs], Fri Apr 1 17:25:26 2011 UTC (13 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.31: +9 -6 lines
Diff to previous 1.31 (colored)

Move an isqrt() call outside a macro, from Michael W Bombardieri.

ok ray

Revision 1.31 / (download) - annotate - [select for diffs], Fri Jul 23 21:46:05 2010 UTC (13 years, 9 months ago) by ray
Branch: MAIN
CVS Tags: OPENBSD_4_9_BASE, OPENBSD_4_9, OPENBSD_4_8_BASE, OPENBSD_4_8
Changes since 1.30: +2 -2 lines
Diff to previous 1.30 (colored)

Reduce variable/function name and whitespace differences between
cvs/rcs.

OK xsa zinovik

Revision 1.30 / (download) - annotate - [select for diffs], Fri Jul 16 17:53:20 2010 UTC (13 years, 10 months ago) by ray
Branch: MAIN
Changes since 1.29: +5 -9 lines
Diff to previous 1.29 (colored)

Combine two diff_output lines into one, from diff.

OK stsp xsa nicm

Revision 1.29 / (download) - annotate - [select for diffs], Thu Jul 15 18:23:50 2010 UTC (13 years, 10 months ago) by ray
Branch: MAIN
Changes since 1.28: +3 -6 lines
Diff to previous 1.28 (colored)

Die immediately if pread fails. It's a fatal error so treat it as
such. Besides, we weren't handling the NULL being returned.

From diff. Minor nit by nicm.

OK xsa stsp nicm

Revision 1.28 / (download) - annotate - [select for diffs], Thu Jul 15 18:19:18 2010 UTC (13 years, 10 months ago) by ray
Branch: MAIN
Changes since 1.27: +2 -2 lines
Diff to previous 1.27 (colored)

Use warnx instead of warn since errno wasn't set. From diff.

OK xsa stsp nicm

Revision 1.27 / (download) - annotate - [select for diffs], Thu Jul 15 11:10:23 2010 UTC (13 years, 10 months ago) by ray
Branch: MAIN
Changes since 1.26: +4 -5 lines
Diff to previous 1.26 (colored)

Sync with diff/diffreg.c r1.75:
Return -1 on error as advertised.
Handle case when only one stream failed.

OK xsa, stsp

Revision 1.26 / (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_7_BASE, OPENBSD_4_7, OPENBSD_4_6_BASE, OPENBSD_4_6
Changes since 1.25: +2 -4 lines
Diff to previous 1.25 (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.25 / (download) - annotate - [select for diffs], Tue Sep 11 15:47:17 2007 UTC (16 years, 8 months ago) by gilles
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
Changes since 1.24: +4 -5 lines
Diff to previous 1.24 (colored)

use strcspn to properly overwrite '\n' in fgets returned buffer

ok pyr@, ray@, millert@, moritz@, chl@

Revision 1.24 / (download) - annotate - [select for diffs], Tue Jul 3 00:56:23 2007 UTC (16 years, 10 months ago) by ray
Branch: MAIN
CVS Tags: OPENBSD_4_2_BASE, OPENBSD_4_2
Changes since 1.23: +2 -2 lines
Diff to previous 1.23 (colored)

Rename rcs_diffreg() to diffreg().

OK joris@

Revision 1.23 / (download) - annotate - [select for diffs], Fri Jun 29 05:04:40 2007 UTC (16 years, 10 months ago) by ray
Branch: MAIN
Changes since 1.22: +2 -2 lines
Diff to previous 1.22 (colored)

Sync cvs/rcs diff code.

OK joris and xsa.

Revision 1.22 / (download) - annotate - [select for diffs], Thu Jun 28 05:01:39 2007 UTC (16 years, 10 months ago) by ray
Branch: MAIN
Changes since 1.21: +46 -51 lines
Diff to previous 1.21 (colored)

diff(1) sync, mostly spacing and moving crap around, except:
- stone() and newcand() cannot return < 0, so don't check it.
- \r, \v, \f are also whitespace

OK joris

Revision 1.21 / (download) - annotate - [select for diffs], Thu Jun 28 01:26:24 2007 UTC (16 years, 10 months ago) by ray
Branch: MAIN
Changes since 1.20: +28 -32 lines
Diff to previous 1.20 (colored)

Some syncs with diff(1):
- prepare() only returns 0, so change it to void and remove code
that checks its return value.
- Rename diff_len[] to len[].
- Remove casts that made the code a no-op:
(size_t)filesize <= SIZE_MAX

OK xsa

Revision 1.20 / (download) - annotate - [select for diffs], Wed May 30 03:30:21 2007 UTC (16 years, 11 months ago) by ray
Branch: MAIN
Changes since 1.19: +2 -2 lines
Diff to previous 1.19 (colored)

Remove cand structure (but not its definition).

Revision 1.19 / (download) - annotate - [select for diffs], Wed May 30 03:24:54 2007 UTC (16 years, 11 months ago) by ray
Branch: MAIN
Changes since 1.18: +1 -8 lines
Diff to previous 1.18 (colored)

Remove unused struct diff_arg.

Revision 1.18 / (download) - annotate - [select for diffs], Tue May 29 08:02:59 2007 UTC (16 years, 11 months ago) by ray
Branch: MAIN
Changes since 1.17: +3 -5 lines
Diff to previous 1.17 (colored)

Get rid of another useless variable, another difference between our
diff code and diff(1).

OK niallo@

Revision 1.17 / (download) - annotate - [select for diffs], Tue May 29 00:19:10 2007 UTC (16 years, 11 months ago) by ray
Branch: MAIN
Changes since 1.16: +11 -22 lines
Diff to previous 1.16 (colored)

Since xrealloc dies on failure it is safe to directly assign to the
original pointer.  Theo agrees, and so does the rest of the tree
(ssh, etc. all do this already).

Saves a bunch of variables and assignments.

OK niallo@

Revision 1.16 / (download) - annotate - [select for diffs], Mon May 28 23:02:40 2007 UTC (16 years, 11 months ago) by ray
Branch: MAIN
Changes since 1.15: +3 -3 lines
Diff to previous 1.15 (colored)

Some spacing syncs with diff(1).

Revision 1.15 / (download) - annotate - [select for diffs], Mon May 28 22:12:44 2007 UTC (16 years, 11 months ago) by ray
Branch: MAIN
Changes since 1.14: +2 -2 lines
Diff to previous 1.14 (colored)

"in formation" -> "information"

OK niallo@

Revision 1.14 / (download) - annotate - [select for diffs], Mon May 28 22:07:40 2007 UTC (16 years, 11 months ago) by ray
Branch: MAIN
Changes since 1.13: +5 -5 lines
Diff to previous 1.13 (colored)

Line up comments with the rest of the file, like in diff(1).

Revision 1.13 / (download) - annotate - [select for diffs], Tue Mar 27 07:21:21 2007 UTC (17 years, 1 month ago) by xsa
Branch: MAIN
Changes since 1.12: +22 -7 lines
Diff to previous 1.12 (colored)

sync with espie@'s latest change to diff(1).

from src/usr.bin/diff/diffreg.c rev 1.67:

improve -p for C++ code: classes definition often have
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...

OK niallo@ espie@.

Revision 1.12 / (download) - annotate - [select for diffs], Tue Feb 27 07:59:13 2007 UTC (17 years, 2 months ago) by xsa
Branch: MAIN
CVS Tags: OPENBSD_4_1_BASE, OPENBSD_4_1
Changes since 1.11: +12 -2 lines
Diff to previous 1.11 (colored)

As done in OpenCVS, general includes cleanup sweep. OK otto@.

Revision 1.11 / (download) - annotate - [select for diffs], Thu Feb 22 08:30:45 2007 UTC (17 years, 2 months ago) by xsa
Branch: MAIN
Changes since 1.10: +3 -2 lines
Diff to previous 1.10 (colored)

Fix const inconsistencies, void pointer artithmetic;
Based on diff from otto@ in OpenCVS. OK otto@.

Revision 1.10 / (download) - annotate - [select for diffs], Wed Sep 27 06:25:46 2006 UTC (17 years, 7 months ago) by ray
Branch: MAIN
Changes since 1.9: +2 -1 lines
Diff to previous 1.9 (colored)

Plug memory leak.

OK niallo@.

Revision 1.9 / (download) - annotate - [select for diffs], Thu Sep 21 15:30:07 2006 UTC (17 years, 8 months ago) by millert
Branch: MAIN
Changes since 1.8: +89 -89 lines
Diff to previous 1.8 (colored)

Add support to rcsdiff for all the other diff flags that
are pertinent to files (not directories) and that do not
conflict with rcsdiff-specific flags.  OK xsa@

Revision 1.8 / (download) - annotate - [select for diffs], Mon Aug 14 23:52:36 2006 UTC (17 years, 9 months ago) by ray
Branch: MAIN
CVS Tags: OPENBSD_4_0_BASE, OPENBSD_4_0
Changes since 1.7: +12 -3 lines
Diff to previous 1.7 (colored)

files_differ() should return -1 on error, according to comments.  Make
it so.

Add checks for all return values.

``put it in'' xsa@

Revision 1.7 / (download) - annotate - [select for diffs], Thu Jul 27 02:57:19 2006 UTC (17 years, 9 months ago) by deraadt
Branch: MAIN
Changes since 1.6: +2 -2 lines
Diff to previous 1.6 (colored)

spacing

Revision 1.6 / (download) - annotate - [select for diffs], Thu May 11 08:40:34 2006 UTC (18 years ago) by ray
Branch: MAIN
Changes since 1.5: +6 -13 lines
Diff to previous 1.5 (colored)

Use fstat instead of stat, simplifie switch statement into if
statement, and remove __inline.

OK xsa@

Revision 1.5 / (download) - annotate - [select for diffs], Wed May 10 01:10:23 2006 UTC (18 years ago) by ray
Branch: MAIN
Changes since 1.4: +6 -6 lines
Diff to previous 1.4 (colored)

Remove (size_t) casts on integer constants.

We should not cover up lint's shortcomings, especially if they no
longer exist.

``This is definately good.'' niallo@.

Revision 1.4 / (download) - annotate - [select for diffs], Fri May 5 15:47:36 2006 UTC (18 years ago) by xsa
Branch: MAIN
Changes since 1.3: +2 -2 lines
Diff to previous 1.3 (colored)

- fix rcsdiff exit status on success/errors; now matches gnu/usr.bin/rcs.
- add DIAGNOSTICS section to rcsdiff.1 wrt exit codes.
ok ray@ and jmc@ for man page bits.

Revision 1.3 / (download) - annotate - [select for diffs], Sat Apr 29 05:31:28 2006 UTC (18 years ago) by ray
Branch: MAIN
Changes since 1.2: +4 -3 lines
Diff to previous 1.2 (colored)

Check return values for all strlcpy, and strlcat calls.

OK xsa@ and probably others.

Revision 1.2 / (download) - annotate - [select for diffs], Wed Apr 26 15:08:25 2006 UTC (18 years ago) by xsa
Branch: MAIN
Changes since 1.1: +2 -2 lines
Diff to previous 1.1 (colored)

err() cleanup;

Revision 1.1 / (download) - annotate - [select for diffs], Wed Apr 26 02:55:13 2006 UTC (18 years ago) by joris
Branch: MAIN

fork our code we shared between openrcs/cvs into the openrcs dir.

this was starting to become inhuman to maintain without
ugly ugly hacks in the shared code, and it will be easier
to make specific changes for openrcs without touching the
soon-to-be-replaced opencvs code.

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.