OpenBSD CVS

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


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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.57 / (download) - annotate - [select for diffs], Fri Aug 11 05:02:21 2023 UTC (9 months, 1 week ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, HEAD
Changes since 1.56: +3 -2 lines
Diff to previous 1.56 (colored)

Switch rcs_{get,set}_mtime() from returning and taking a time_t to
doing so with a struct timespec and then use tv_nsec = UTIME_OMIT
instead of a (time_t)-1 as a "do nothing" value.  They can then
fully preserve the timestamp

ok millert@

Revision 1.56 / (download) - annotate - [select for diffs], Fri Aug 26 09:02:54 2016 UTC (7 years, 8 months ago) by guenther
Branch: MAIN
CVS Tags: 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, 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.55: +2 -1 lines
Diff to previous 1.55 (colored)

Pull in <time.h> for struct tm, used in rcs.h

ok deraadt@

Revision 1.55 / (download) - annotate - [select for diffs], Mon Nov 2 16:45:21 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_0_BASE, OPENBSD_6_0, OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.54: +3 -5 lines
Diff to previous 1.54 (colored)

Allow rcsnum_free and buf_free to accept NULL and remove various NULL
checks that are now unnecessary, from Michael W Bombardieri. ok millert

Revision 1.54 / (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_8_BASE, OPENBSD_5_8, OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.53: +2 -2 lines
Diff to previous 1.53 (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.53 / (download) - annotate - [select for diffs], Thu Oct 2 06:23:15 2014 UTC (9 years, 7 months ago) by otto
Branch: MAIN
Changes since 1.52: +4 -5 lines
Diff to previous 1.52 (colored)

exit in usage functions themselves; from  Fritjof Bornebusch; ok nicm@

Revision 1.52 / (download) - annotate - [select for diffs], Wed Jul 28 09:07:11 2010 UTC (13 years, 9 months ago) by ray
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, 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, OPENBSD_4_9_BASE, OPENBSD_4_9, OPENBSD_4_8_BASE, OPENBSD_4_8
Changes since 1.51: +2 -2 lines
Diff to previous 1.51 (colored)

Make BUFs autoextend by default.  This was already done in OpenCVS
a while ago.

OK zinovik nicm

Revision 1.51 / (download) - annotate - [select for diffs], Fri Jul 23 21:46:05 2010 UTC (13 years, 9 months ago) by ray
Branch: MAIN
Changes since 1.50: +7 -7 lines
Diff to previous 1.50 (colored)

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

OK xsa zinovik

Revision 1.50 / (download) - annotate - [select for diffs], Sat Jun 30 08:23:49 2007 UTC (16 years, 10 months ago) by xsa
Branch: MAIN
CVS Tags: OPENBSD_4_7_BASE, OPENBSD_4_7, OPENBSD_4_6_BASE, OPENBSD_4_6, 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.49: +2 -2 lines
Diff to previous 1.49 (colored)

Sync revisions and time buffers size to be consistent with each others.
Simplifies further size tweaks if needed.
OK ray@.

Revision 1.49 / (download) - annotate - [select for diffs], Mon Apr 16 07:35:10 2007 UTC (17 years, 1 month ago) by xsa
Branch: MAIN
Changes since 1.48: +2 -2 lines
Diff to previous 1.48 (colored)

file argument is not mandatory, say so.
from Pierre Riteau via ray@; OK jmc@.

Revision 1.48 / (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.47: +8 -2 lines
Diff to previous 1.47 (colored)

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

Revision 1.47 / (download) - annotate - [select for diffs], Sat May 27 05:49:14 2006 UTC (17 years, 11 months ago) by ray
Branch: MAIN
CVS Tags: OPENBSD_4_0_BASE, OPENBSD_4_0
Changes since 1.46: +2 -2 lines
Diff to previous 1.46 (colored)

Remove rcs_statfile().  It was just a wrapper for rcs_choosefile(),
handling exceptions oddly.

OK joris@

Revision 1.46 / (download) - annotate - [select for diffs], Tue May 9 12:33:42 2006 UTC (18 years ago) by ray
Branch: MAIN
Changes since 1.45: +1 -2 lines
Diff to previous 1.45 (colored)

Remove /* NOTREACHED */ comments, now that lint is smart about
__dead.  I never should have put them there.

OK xsa@.

Revision 1.45 / (download) - annotate - [select for diffs], Wed Apr 26 21:55:22 2006 UTC (18 years ago) by joris
Branch: MAIN
Changes since 1.44: +7 -6 lines
Diff to previous 1.44 (colored)

prevent file races by obtaining an fd for the RCS file and
do our operations on that, this is safe and guarantees we
can operate on the file until we close(2) it.

a fix is coming for the remaining races in our diff code.
okay niallo@ and ray@

Revision 1.44 / (download) - annotate - [select for diffs], Wed Apr 26 02:55:13 2006 UTC (18 years ago) by joris
Branch: MAIN
Changes since 1.43: +7 -7 lines
Diff to previous 1.43 (colored)

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.

Revision 1.43 / (download) - annotate - [select for diffs], Tue Apr 25 13:36:35 2006 UTC (18 years ago) by xsa
Branch: MAIN
Changes since 1.42: +2 -2 lines
Diff to previous 1.42 (colored)

fatal() -> err()/errx() as we try to not depend on heavy cvs_log().
OK joriski.

Revision 1.42 / (download) - annotate - [select for diffs], Tue Apr 25 03:21:16 2006 UTC (18 years ago) by ray
Branch: MAIN
Changes since 1.41: +2 -2 lines
Diff to previous 1.41 (colored)

The -r flag without an argument signifies HEAD for rcsclean.

OK xsa@ and joris@

Revision 1.41 / (download) - annotate - [select for diffs], Mon Apr 24 16:20:33 2006 UTC (18 years ago) by jmc
Branch: MAIN
Changes since 1.40: +3 -3 lines
Diff to previous 1.40 (colored)

- the argument to -r is optional
- beef up DESCRIPTION
- better descriptions of -r and -u
- sync usage()

help/ok xsa

Revision 1.40 / (download) - annotate - [select for diffs], Mon Apr 24 08:10:41 2006 UTC (18 years ago) by xsa
Branch: MAIN
Changes since 1.39: +2 -2 lines
Diff to previous 1.39 (colored)

be consistent in error messages for wrongly specified keyword substitution
mode for `-k'.

Revision 1.39 / (download) - annotate - [select for diffs], Fri Apr 21 17:17:29 2006 UTC (18 years, 1 month ago) by xsa
Branch: MAIN
Changes since 1.38: +2 -2 lines
Diff to previous 1.38 (colored)

move shared functions into rcsutil.[ch]; this makes rcsprog.c cleaner;
"the voices in my head say OK!" joris@.

Revision 1.38 / (download) - annotate - [select for diffs], Fri Apr 21 14:18:26 2006 UTC (18 years, 1 month ago) by xsa
Branch: MAIN
Changes since 1.37: +7 -9 lines
Diff to previous 1.37 (colored)

remove overkill cvs_log() and rather use warn()/warnx().
OK ray@ and discussed with joris@.

Revision 1.37 / (download) - annotate - [select for diffs], Wed Apr 19 06:53:41 2006 UTC (18 years, 1 month ago) by xsa
Branch: MAIN
Changes since 1.36: +4 -4 lines
Diff to previous 1.36 (colored)

switch -q handling to bitwise flags; OK ray@ niallo@.

Revision 1.36 / (download) - annotate - [select for diffs], Mon Apr 17 04:50:08 2006 UTC (18 years, 1 month ago) by ray
Branch: MAIN
Changes since 1.35: +1 -5 lines
Diff to previous 1.35 (colored)

Remove pointless stat() call.

OK joris@

Revision 1.35 / (download) - annotate - [select for diffs], Fri Apr 14 16:28:24 2006 UTC (18 years, 1 month ago) by ray
Branch: MAIN
Changes since 1.34: +3 -2 lines
Diff to previous 1.34 (colored)

Add missing usage() calls.

``crazy'' joris@

Revision 1.34 / (download) - annotate - [select for diffs], Fri Apr 14 16:16:02 2006 UTC (18 years, 1 month ago) by ray
Branch: MAIN
Changes since 1.33: +32 -26 lines
Diff to previous 1.33 (colored)

Plug obvious memory leaks.

The comparison function was previously changed by me to use strcmp,
which is probably wrong since a buffer can theoretically have NULs
in it.  This fixes it.  (In my defense, the original code converted
the buffer text to char * values and compared until there was either
a difference or until a NUL was reached, so my previous change was
no worse.)

OK joris@

Revision 1.33 / (download) - annotate - [select for diffs], Fri Apr 14 01:11:07 2006 UTC (18 years, 1 month ago) by deraadt
Branch: MAIN
Changes since 1.32: +3 -3 lines
Diff to previous 1.32 (colored)

excessive addition to brackets is a mental disease.  you will go
blind, too.  seek help.  no binary change, ok joris

Revision 1.32 / (download) - annotate - [select for diffs], Thu Apr 13 16:23:31 2006 UTC (18 years, 1 month ago) by ray
Branch: MAIN
Changes since 1.31: +1 -3 lines
Diff to previous 1.31 (colored)

Remove unused variable.

Found by lint.

OK xsa@

Revision 1.31 / (download) - annotate - [select for diffs], Thu Apr 13 00:58:25 2006 UTC (18 years, 1 month ago) by ray
Branch: MAIN
Changes since 1.30: +22 -26 lines
Diff to previous 1.30 (colored)

*** empty log message ***

Revision 1.30 / (download) - annotate - [select for diffs], Wed Apr 12 08:23:30 2006 UTC (18 years, 1 month ago) by ray
Branch: MAIN
Changes since 1.29: +14 -8 lines
Diff to previous 1.29 (colored)

Clean up <rev> handling.  Whenever a revision is specified after a
flag, it calls one of two new functions: rcs_setrevstr() or
rcs_setrevstr2().  rcs_setrevstr() sets a string to another string,
and complains if it was set more than once.  rcs_setrevstr2() takes
two strings, sets one after the other, and fatal()s if more than
two strings were given.

All <rev> handling is now done in the loop that goes through each
argv.  This is necessary for parsing symbols, which will be much
easier after this.

Along the way a lot of memory leaks were cleaned up.  There is one
area where rcs_set_rev() is called, which allocates a RCSNUM and
stores it in pb.newrev, but it segfaults whenever I try to rcsnum_free()
it.  I put an /* XXX */ comment there for now.

Passes regression tests and the code is less complicated in some
ways (to me).

Suggestions and OK xsa@

Revision 1.29 / (download) - annotate - [select for diffs], Mon Apr 10 08:08:00 2006 UTC (18 years, 1 month ago) by xsa
Branch: MAIN
Changes since 1.28: +2 -3 lines
Diff to previous 1.28 (colored)

change rcs_kwexp_set() return type to void and simplify its use. OK niallo@.

Revision 1.28 / (download) - annotate - [select for diffs], Fri Mar 24 15:57:29 2006 UTC (18 years, 2 months ago) by xsa
Branch: MAIN
Changes since 1.27: +9 -10 lines
Diff to previous 1.27 (colored)

change rcsclean_file() return type to void as it does not need
to be checked. OK ray@.

Revision 1.27 / (download) - annotate - [select for diffs], Fri Mar 24 05:14:48 2006 UTC (18 years, 2 months ago) by ray
Branch: MAIN
Changes since 1.26: +4 -3 lines
Diff to previous 1.26 (colored)

Allow the -x flag to be used without an extension.

``that makes sense'' xsa@

Revision 1.26 / (download) - annotate - [select for diffs], Thu Mar 16 04:04:57 2006 UTC (18 years, 2 months ago) by ray
Branch: MAIN
Changes since 1.25: +2 -1 lines
Diff to previous 1.25 (colored)

Follow exit() with /* NOTREACHED*/ for lint.

``OK niallo@'' niallo@

Revision 1.25 / (download) - annotate - [select for diffs], Wed Mar 15 05:05:36 2006 UTC (18 years, 2 months ago) by deraadt
Branch: MAIN
Changes since 1.24: +2 -2 lines
Diff to previous 1.24 (colored)

remove some bizzare idioms; ok ray

Revision 1.24 / (download) - annotate - [select for diffs], Mon Mar 6 14:59:06 2006 UTC (18 years, 2 months ago) by jmc
Branch: MAIN
Changes since 1.23: +3 -3 lines
Diff to previous 1.23 (colored)

update usage();

Revision 1.23 / (download) - annotate - [select for diffs], Thu Jan 5 10:28:24 2006 UTC (18 years, 4 months ago) by xsa
Branch: MAIN
CVS Tags: OPENBSD_3_9_BASE, OPENBSD_3_9
Changes since 1.22: +2 -4 lines
Diff to previous 1.22 (colored)

cleanup, move log.h and rcs.h inclusion into rcsprog.h;

Revision 1.22 / (download) - annotate - [select for diffs], Mon Jan 2 08:13:28 2006 UTC (18 years, 4 months ago) by xsa
Branch: MAIN
Changes since 1.21: +2 -9 lines
Diff to previous 1.21 (colored)

#include's cleanup; ok joris@ niallo@.

Revision 1.21 / (download) - annotate - [select for diffs], Mon Dec 19 18:24:12 2005 UTC (18 years, 5 months ago) by xsa
Branch: MAIN
Changes since 1.20: +2 -2 lines
Diff to previous 1.20 (colored)

use fatal() if getlogin() fails;

Revision 1.20 / (download) - annotate - [select for diffs], Sat Dec 10 20:27:46 2005 UTC (18 years, 5 months ago) by joris
Branch: MAIN
Changes since 1.19: +3 -3 lines
Diff to previous 1.19 (colored)

switch to xmalloc stuff, me and xsa@ agreed on this a long
time ago, but we were being held back by jfb. too bad for him.

next step is to use fatal() through out the code for unrecoverable
errors instead of trying to be all nice and fluffy and reach main() again.

ok niallo@ and xsa@

Revision 1.19 / (download) - annotate - [select for diffs], Thu Dec 8 18:56:10 2005 UTC (18 years, 5 months ago) by joris
Branch: MAIN
Changes since 1.18: +6 -2 lines
Diff to previous 1.18 (colored)

complete and correct rcs locking functionality,
it was only done partially and as a bonus, completely wrong.

seriously guys what was up with that?

Revision 1.18 / (download) - annotate - [select for diffs], Mon Nov 28 14:43:59 2005 UTC (18 years, 5 months ago) by xsa
Branch: MAIN
Changes since 1.17: +2 -2 lines
Diff to previous 1.17 (colored)

sync usage() for `-xsuffixes';

Revision 1.17 / (download) - annotate - [select for diffs], Fri Nov 25 14:16:44 2005 UTC (18 years, 5 months ago) by xsa
Branch: MAIN
Changes since 1.16: +11 -3 lines
Diff to previous 1.16 (colored)

add `-T' support for rcsclean(1) and rcs(1);

Revision 1.16 / (download) - annotate - [select for diffs], Wed Nov 23 09:39:20 2005 UTC (18 years, 5 months ago) by xsa
Branch: MAIN
Changes since 1.15: +7 -3 lines
Diff to previous 1.15 (colored)

initial bits for -T support;

Revision 1.15 / (download) - annotate - [select for diffs], Mon Nov 21 16:20:29 2005 UTC (18 years, 6 months ago) by xsa
Branch: MAIN
Changes since 1.14: +5 -2 lines
Diff to previous 1.14 (colored)

enable `-xsuffixes' support as it has been added a few days ago
in rcs_statfile();
niallo ok

Revision 1.14 / (download) - annotate - [select for diffs], Thu Nov 17 18:14:12 2005 UTC (18 years, 6 months ago) by xsa
Branch: MAIN
Changes since 1.13: +7 -6 lines
Diff to previous 1.13 (colored)

yet another output fix;

Revision 1.13 / (download) - annotate - [select for diffs], Wed Nov 16 11:42:03 2005 UTC (18 years, 6 months ago) by xsa
Branch: MAIN
Changes since 1.12: +2 -2 lines
Diff to previous 1.12 (colored)

fix output if file is not locked;

Revision 1.12 / (download) - annotate - [select for diffs], Wed Nov 2 11:01:40 2005 UTC (18 years, 6 months ago) by xsa
Branch: MAIN
Changes since 1.11: +7 -3 lines
Diff to previous 1.11 (colored)

sync with Reality;

Revision 1.11 / (download) - annotate - [select for diffs], Sat Oct 29 09:27:02 2005 UTC (18 years, 6 months ago) by xsa
Branch: MAIN
Changes since 1.10: +20 -5 lines
Diff to previous 1.10 (colored)

rcsclean -u support; ok joris niallo

Revision 1.10 / (download) - annotate - [select for diffs], Wed Oct 19 18:28:13 2005 UTC (18 years, 7 months ago) by xsa
Branch: MAIN
Changes since 1.9: +2 -2 lines
Diff to previous 1.9 (colored)

sync usage();

Revision 1.9 / (download) - annotate - [select for diffs], Wed Oct 19 16:15:36 2005 UTC (18 years, 7 months ago) by xsa
Branch: MAIN
Changes since 1.8: +2 -2 lines
Diff to previous 1.8 (colored)

.Xr rcsmerge(1) + one style nitpick;

Revision 1.8 / (download) - annotate - [select for diffs], Tue Oct 18 01:22:14 2005 UTC (18 years, 7 months ago) by joris
Branch: MAIN
Changes since 1.7: +2 -5 lines
Diff to previous 1.7 (colored)

use rcs_set_rev() instead of duplicating code all over the
place to set a variable to the given revision number;

Revision 1.7 / (download) - annotate - [select for diffs], Thu Oct 13 12:35:30 2005 UTC (18 years, 7 months ago) by joris
Branch: MAIN
Changes since 1.6: +6 -6 lines
Diff to previous 1.6 (colored)

To be fully compatibly with the GNU RCS tools we need to have the
same way of parsing commandline options. Since getopt(3) allows spaces
between arguments and GNU RCS tools does not we needed to roll out our
own way of option handling, and here it is.

ok niallo@

Revision 1.6 / (download) - annotate - [select for diffs], Wed Oct 12 17:43:18 2005 UTC (18 years, 7 months ago) by xsa
Branch: MAIN
Changes since 1.5: +2 -2 lines
Diff to previous 1.5 (colored)

minor knf;

Revision 1.5 / (download) - annotate - [select for diffs], Wed Oct 12 17:13:30 2005 UTC (18 years, 7 months ago) by deraadt
Branch: MAIN
Changes since 1.4: +3 -3 lines
Diff to previous 1.4 (colored)

various usage cleanup; ok joris

Revision 1.4 / (download) - annotate - [select for diffs], Fri Oct 7 23:59:56 2005 UTC (18 years, 7 months ago) by niallo
Branch: MAIN
Changes since 1.3: +2 -2 lines
Diff to previous 1.3 (colored)

basic `ci' support is here! more coming soon.

combined effort with joris.

ok joris@

Revision 1.3 / (download) - annotate - [select for diffs], Thu Oct 6 11:46:03 2005 UTC (18 years, 7 months ago) by joris
Branch: MAIN
Changes since 1.2: +26 -3 lines
Diff to previous 1.2 (colored)

support -n and -k flags;

Revision 1.2 / (download) - annotate - [select for diffs], Thu Oct 6 02:12:53 2005 UTC (18 years, 7 months ago) by joris
Branch: MAIN
Changes since 1.1: +9 -3 lines
Diff to previous 1.1 (colored)

add -r flag and sync usage;

Revision 1.1 / (download) - annotate - [select for diffs], Thu Oct 6 02:00:05 2005 UTC (18 years, 7 months ago) by joris
Branch: MAIN

rcsclean now works;

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.