summaryrefslogtreecommitdiff
path: root/usr.bin/rcs/rcs.c
AgeCommit message (Collapse)Author
2021-11-28Stop using MAXBSIZE to eliminate sys/param.h including (which injects aTheo de Raadt
ton of namespace intrusion). Create local sizes, and refactor some code along the way. ok millert
2019-01-09When expanding $Log$ make sure a newline is added if rd_log has none.Joris Vink
This can happen on new RCS files. Fixes $Log$ keyword expansion.
2019-01-09Make sure rcs_lock_add() and rcs_lock_remove() properly update theJoris Vink
rd_lock member of the matching delta. Other keyword substitution will not properly work in cases where the RCS file did not have a lock for the revision yet or if the lock is being removed.
2018-12-30Delete unnecessary <libgen.h> #includesPhilip Guenther
ok deraadt@
2016-05-09Implement Mdocdate keyword substitution.Ingo Schwarze
In particular, this stops rcsdiff(1) and CVSweb from showing wrong Mdocdate lines in diffs. Problem originally reported by tj@. OK tobias@ otto@ millert@
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-06-13Convert xfree to free. From Fritjof Bornebusch. ok deraadtNicholas Marriott
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-10Zap some stored values never read; From Fritjof Bornebusch; ok nicm@Otto Moerbeek
2014-01-07ctype cleanups; ok okanTheo de Raadt
2012-03-03Remove unused variable, from Michael W Bombardieri who also got an okNicholas Marriott
from tobias@.
2011-07-14spacing, no binary change.Igor Sobrado
2011-07-06Replace the keyword expansion code with a faster, more readable versionNicholas Marriott
which additionally also supports $Log$ and $Locker. Written by Joerg Sonnenberger and tweaked by me. ok ray
2011-05-20Remove a bunch of unused functions, from Michael W Bombardieri.Nicholas Marriott
ok ray
2011-04-20Remove some unneeded includes and dead code, from Michael W Bombardieri.Nicholas Marriott
ok jasper xsa
2011-04-04previous commit introduced a crash: the removed strtol was being used toDamien Miller
skip past a value and it couldn't just be nuked
2011-03-27- remove unused variablesJasper Lievisse Adriaanse
from Michael W. Bombardieri ok chl@ nicm@
2010-12-10- plug an fd leakJasper Lievisse Adriaanse
help/ok chl@ nicm@
2010-10-27Merge -k and expand @@ parsing code between OpenCVS and OpenRCS, resultingTobias Stoeckmann
in a performance gain in OpenCVS in some "cvs update" scenarios. ok zinovik
2010-10-20Merge OpenCVS' rcs_deltatext_set into OpenRCS, fixing a memory leak.Tobias Stoeckmann
ok nicm zinovik
2010-10-20Remove the need for rp_file in parser structure, instead keep only oneTobias Stoeckmann
FILE pointer in RCSFILE. This fixes some ugliness in closing an fdopen()ed FILE and its underlying file descriptor. Notified by Joerg Sonnenberger <joerg at britannica dot bec to de> discussed with and ok nicm
2010-10-15Replaced RCS parser code with new rcsparse.{c,h}:Tobias Stoeckmann
- be very strict about things we parse - print more information about errors if they occur - do not fatal() directly in parser, give caller a chance to react - fix an rcs design issue when it comes to login names tested by many on tech@ ok xsa
2010-10-05Zapped unused function rcs_tag_resolve.Tobias Stoeckmann
ok xsa
2010-10-05rcs_state_check must check for more invalid characters than just space.Tobias Stoeckmann
ok nicm
2010-09-29Ensure that we always parse all deltas before expecting "desc" keyword.Tobias Stoeckmann
ok nicm, zinovik
2010-09-23Plug memory leak in rcs_getrev, from zinovik.Nicholas Marriott
ok me stsp
2010-09-11Fixed typo.Tobias Stoeckmann
ok ray, zinovik
2010-09-02rcsnum_parse() allocates already an RCSNUM struct, so it's not needed toTobias Stoeckmann
copy it into a newly allocated one (which is even a memory leak). ok zinovik
2010-08-31styleTobias Stoeckmann
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
2010-07-23Rename a bunch of variables and functions, removing the cvs_/rcs_Ray Lai
prefixes to reduce differences between cvs and rcs files. "yes!" nicm
2010-07-21Only use username if author is NULL. Fixes "ci -wusername" when runRay Lai
as root. OK nicm
2010-07-13Don't read before the beginning of the log message if it is zero-lengthNicholas Marriott
(possible when it comes from stdin). Tweaked version of a fix from Peter Hendrickson in PR 6423. ok deraadt
2010-07-09Make cvs and rcs consistent in what characters they'll accept inChristian Weisgerber
symbol/tag names: require the first character to be a letter and allow any printable character (except the RCS specials $,.:;@) afterwards. This matches GNU cvs. ok xsa@ zinovik@ stsp@
2009-04-14tried to fix a the-the in the comment, ended up rewriting it. with/from joris@Janne Johansson
2009-02-25Checking if a file is ASCII should only be done when diffing, becauseRay Lai
the non-ASCII characters could be printed to the screen. For checking in files, checking out files, merging files, and removing revisions of files, we do so regardless of whether the files are ASCII or binary. Fixes PR6031. OK joris and deraadt.
2009-02-15add our temporary RCS file to our temp_files worklist in caseJoris Vink
for some reason we get interrupted before calling rename(). we hate leaving behind temporary files.
2008-11-09Removed unneeded conversion from RCSNUM to string in rcs_rev_setlog.Tobias Stoeckmann
oki joris@
2008-11-08Support for retrieving revisions from branches in branches was missing.Tobias Stoeckmann
Reported by chl@, ok joris@
2008-10-09cvs(1) uses a config file to know about the $OpenBSD$ expansion keyword,Theo de Raadt
but unfortunately rcs is not so lucky, and it will have to encoded inside. A bit gross, but what can we do? PR 5953, ok tobias
2008-09-17try getlogin() to get the real username when comitting files as root.Reyk Floeter
this gives better information in log messages when the user logged in with a different uid and used sudo or su to become root. matches the behaviour of gcvs except that we don't fallback to LOGNAME or USER since getlogin() should not lie. ok tobias@
2008-05-11Memory leak in rcs_delta_stats plugged.Tobias Stoeckmann
ok joris
2008-02-02From src/usr.bin/cvs:Xavier Santolaria
> add changed lines support to log and rlog (the + and - stuff) > from Pierre Riteau;
2008-01-31Revert last patch and add this magic branch number only duringTobias Stoeckmann
output, this way we don't have to hassle in our internal brach handling. OK joris@
2008-01-06Branches are separated with \n\t in GNU rcs/cvs.Tobias Stoeckmann
This makes regress tests easier to check with OpenCVS and GNU cvs. OK xsa@
2008-01-06gnu cvs added a new keyword 'commitid', this diff adds just enough codeNikolay Sturm
to parse the commitid so that cvsweb (using rcs) continues to work on those files ok niallo@, xsa@
2007-08-27typo in error msg; from Igor Zinovik.Xavier Santolaria
2007-07-03Rename rcs_diffreg() to diffreg().Ray Lai
OK joris@
2007-06-30Sync revisions and time buffers size to be consistent with each others.Xavier Santolaria
Simplifies further size tweaks if needed. OK ray@.