summaryrefslogtreecommitdiff
path: root/usr.bin/rcs/rcsclean.c
AgeCommit message (Collapse)Author
2016-08-26Pull in <time.h> for struct tm, used in rcs.hPhilip Guenther
ok deraadt@
2015-11-02Allow rcsnum_free and buf_free to accept NULL and remove various NULLNicholas Marriott
checks that are now unnecessary, from Michael W Bombardieri. ok millert
2015-01-16Replace <sys/param.h> with <limits.h> and other less dirty headers whereTheo de Raadt
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)
2014-10-02exit in usage functions themselves; from Fritjof Bornebusch; ok nicm@Otto Moerbeek
2010-07-28Make BUFs autoextend by default. This was already done in OpenCVSRay Lai
a while ago. OK zinovik nicm
2010-07-23Reduce variable/function name and whitespace differences betweenRay Lai
cvs/rcs. OK xsa zinovik
2007-06-30Sync revisions and time buffers size to be consistent with each others.Xavier Santolaria
Simplifies further size tweaks if needed. OK ray@.
2007-04-16file argument is not mandatory, say so.Xavier Santolaria
from Pierre Riteau via ray@; OK jmc@.
2007-02-27As done in OpenCVS, general includes cleanup sweep. OK otto@.Xavier Santolaria
2006-05-27Remove rcs_statfile(). It was just a wrapper for rcs_choosefile(),Ray Lai
handling exceptions oddly. OK joris@
2006-05-09Remove /* NOTREACHED */ comments, now that lint is smart aboutRay Lai
__dead. I never should have put them there. OK xsa@.
2006-04-26prevent file races by obtaining an fd for the RCS file andJoris Vink
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@
2006-04-26fork our code we shared between openrcs/cvs into the openrcs dir.Joris Vink
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.
2006-04-25fatal() -> err()/errx() as we try to not depend on heavy cvs_log().Xavier Santolaria
OK joriski.
2006-04-25The -r flag without an argument signifies HEAD for rcsclean.Ray Lai
OK xsa@ and joris@
2006-04-24- the argument to -r is optionalJason McIntyre
- beef up DESCRIPTION - better descriptions of -r and -u - sync usage() help/ok xsa
2006-04-24be consistent in error messages for wrongly specified keyword substitutionXavier Santolaria
mode for `-k'.
2006-04-21move shared functions into rcsutil.[ch]; this makes rcsprog.c cleaner;Xavier Santolaria
"the voices in my head say OK!" joris@.
2006-04-21remove overkill cvs_log() and rather use warn()/warnx().Xavier Santolaria
OK ray@ and discussed with joris@.
2006-04-19switch -q handling to bitwise flags; OK ray@ niallo@.Xavier Santolaria
2006-04-17Remove pointless stat() call.Ray Lai
OK joris@
2006-04-14Add missing usage() calls.Ray Lai
``crazy'' joris@
2006-04-14Plug obvious memory leaks.Ray Lai
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@
2006-04-14excessive addition to brackets is a mental disease. you will goTheo de Raadt
blind, too. seek help. no binary change, ok joris
2006-04-13Remove unused variable.Ray Lai
Found by lint. OK xsa@
2006-04-13*** empty log message ***Ray Lai
2006-04-12Clean up <rev> handling. Whenever a revision is specified after aRay Lai
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@
2006-04-10change rcs_kwexp_set() return type to void and simplify its use. OK niallo@.Xavier Santolaria
2006-03-24change rcsclean_file() return type to void as it does not needXavier Santolaria
to be checked. OK ray@.
2006-03-24Allow the -x flag to be used without an extension.Ray Lai
``that makes sense'' xsa@
2006-03-16Follow exit() with /* NOTREACHED*/ for lint.Ray Lai
``OK niallo@'' niallo@
2006-03-15remove some bizzare idioms; ok rayTheo de Raadt
2006-03-06update usage();Jason McIntyre
2006-01-05cleanup, move log.h and rcs.h inclusion into rcsprog.h;Xavier Santolaria
2006-01-02#include's cleanup; ok joris@ niallo@.Xavier Santolaria
2005-12-19use fatal() if getlogin() fails;Xavier Santolaria
2005-12-10switch to xmalloc stuff, me and xsa@ agreed on this a longJoris Vink
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@
2005-12-08complete and correct rcs locking functionality,Joris Vink
it was only done partially and as a bonus, completely wrong. seriously guys what was up with that?
2005-11-28sync usage() for `-xsuffixes';Xavier Santolaria
2005-11-25add `-T' support for rcsclean(1) and rcs(1);Xavier Santolaria
2005-11-23initial bits for -T support;Xavier Santolaria
2005-11-21enable `-xsuffixes' support as it has been added a few days agoXavier Santolaria
in rcs_statfile(); niallo ok
2005-11-17yet another output fix;Xavier Santolaria
2005-11-16fix output if file is not locked;Xavier Santolaria
2005-11-02sync with Reality;Xavier Santolaria
2005-10-29rcsclean -u support; ok joris nialloXavier Santolaria
2005-10-19sync usage();Xavier Santolaria
2005-10-19.Xr rcsmerge(1) + one style nitpick;Xavier Santolaria
2005-10-18use rcs_set_rev() instead of duplicating code all over theJoris Vink
place to set a variable to the given revision number;
2005-10-13To be fully compatibly with the GNU RCS tools we need to have theJoris Vink
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@