summaryrefslogtreecommitdiffstats
path: root/usr.bin/rcs/rcsprog.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* o Better match GNU behavior (a bare -t does NOT read from stdin,ray2006-04-241-36/+3
| | | | | | | | unlike rcs). o Share code with rcs by moving rcs_set_description() to rcsutil.c. o Change description prompt from #define to const char *. OK xsa@
* move shared functions into rcsutil.[ch]; this makes rcsprog.c cleaner;xsa2006-04-211-418/+5
| | | | "the voices in my head say OK!" joris@.
* match former rcs implementation warning message if no options arexsa2006-04-211-1/+6
| | | | specified when using rcs(1). OK ray@ joris@.
* remove overkill cvs_log() and rather use warn()/warnx().xsa2006-04-211-25/+20
| | | | OK ray@ and discussed with joris@.
* switch -p handling to bitwise flags; OK ray@.xsa2006-04-211-2/+1
|
* switch -q handling to bitwise flags; OK ray@ niallo@.xsa2006-04-191-7/+6
|
* Combine code to prompt user for input into a shared function,ray2006-04-181-33/+40
| | | | | | reducing some complex fats from ci.c. OK joris@
* Remove -h flag from rcs_getopt loop, which is not in GNU.ray2006-04-181-6/+2
| | | | OK xsa@
* plug memory leak; OK ray@.xsa2006-04-171-1/+4
|
* dont stupidly duplicate code. make rlog use rcs_rev_select() and thusxsa2006-04-151-3/+2
| | | | nuke rlog_rev_select(). OK niallo@.
* - don't append the extension if it's already there (PR 5076).joris2006-04-141-3/+13
| | | | | | | | | | - show magic branches in rlog (thanks for that nicer hack niall). - correct output in rcsdiff, so we perfectly match gnu's all these bugs were found by sturm@ while he was using cvsweb (which uses the RCS tools). "it is in my view that you should put it in" niallo@
* excessive addition to brackets is a mental disease. you will goderaadt2006-04-141-9/+9
| | | | blind, too. seek help. no binary change, ok joris
* add support for the openrcs -o'range' option.joris2006-04-131-7/+103
| | | | | | | | | | | -o allows users to delete revisions in the specified RCS files. example: rcs -o1.4:1.6 foo deletes revisions 1.4 - 1.6 rcs -o1.3 foo deletes revision 1.3 joint work with niallo@ okay niallo@
* clean up temporary files when we finish running.joris2006-04-131-1/+4
| | | | "cool" niallo@
* *** empty log message ***ray2006-04-131-1/+20
|
* Better match GNU behavior for rcs -l and rcs -u.ray2006-04-121-7/+16
| | | | | | Save 2 bytes of newlines. OK joris@
* Clean up <rev> handling. Whenever a revision is specified after aray2006-04-121-8/+35
| | | | | | | | | | | | | | | | | | | | | | 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@
* Don't rcs_close() before fatal(). After much hesitation, joris@ray2006-04-111-7/+3
| | | | | | and xsa@ finally convinced me this is safe (and better). OK joris@, niallo@, and xsa@.
* change rcs_kwexp_set() return type to void and simplify its use. OK niallo@.xsa2006-04-101-4/+4
|
* change rcs_set_mtime() return type to void.xsa2006-04-071-10/+5
|
* -z can take no argument.xsa2006-04-061-2/+2
|
* Add rcs -l, rcs -u, and regression tests.ray2006-04-011-6/+64
| | | | ``put it all in'' joris@
* Keep cvs flags in `flags', rcs flags in `rcsflags' in rcsprog.h.ray2006-04-011-6/+2
| | | | | | Prevents bitfield pollution between the two. ``This is how it should be.'' niallo@
* shudup rcs_set_description(), so regress tests are happy too.xsa2006-03-281-3/+5
|
* - properly implement GNU file modes. basically, checkout will inheritniallo2006-03-271-2/+2
| | | | | | | | | permissions from rcs file and initial checkin will inherit permissions from working file. problem spotted by uwe@ ok ray@ xsa@
* Fix and clean up -t flag:ray2006-03-271-3/+25
| | | | | | | | | | | | | | | - Add comments. - Support -t-inline-comments-like-man-page-says. - -tfilename still works. - When using -t (read description from stdin) don't end when first character is `.'. Instead, end if whole line consists of one `.'. - Add regression test. I also changed the regression Makefile to have a trailing slash on the final element. As long as we have a blank line it will be fine, plus it will save us some trouble when adding new tests. After adding line breaks, ``rest looks fine.'' xsa@
* Changes:ray2006-03-271-18/+17
| | | | | | | | | | | | - RCS_CREATE is now set in flags. - Since flags & RCS_CREATE is used in rcs_statfile(), flags is now a global variable. - RCS_[ENT]FLAG -> RCSPROG_[ENT]FLAG - Call rcs_set_description() if -t flag is given or if RCS_CREATE is set, checked in that order. If the -t flag is given and RCS_CREATE is set, don't call rcs_set_description() twice. ``commitski!!'' xsa@
* Plug a memory leak for all cvs_strsplit call sites; ok xsa@pat2006-03-271-9/+9
|
* Allow the -x flag to be used without an extension.ray2006-03-241-3/+4
| | | | ``that makes sense'' xsa@
* use fatal() in rcs_lock_setmode(); OK ray@.xsa2006-03-231-2/+2
|
* Clean up xfree() usage in rcs_choosefile().ray2006-03-221-18/+14
| | | | OK xsa@
* add support for `rcs -e[logins]'; "Looks good" ray@.xsa2006-03-211-4/+27
|
* Instead of duplicating rcs_suffixes and running strsep on it again,ray2006-03-211-12/+5
| | | | | | | just use the previous suffixes. Since all slashes were replaced with NULs, reading `suffixes' will give the first extension. OK xsa@
* Allow creation of an RCS file if RCS_CREATE flag set.ray2006-03-211-3/+3
| | | | OK xsa@
* make `rcs -a' use cvs_strsplit() for easiness; OK joris@.xsa2006-03-201-11/+8
|
* +/* ARGSUSED */ray2006-03-181-1/+3
| | | | | | | void sighdlr(int sig) OK niallo@
* strdup() -> xstrdup()ray2006-03-181-12/+6
| | | | Okay xsa@
* Follow exit() with /* NOTREACHED*/ for lint.ray2006-03-161-1/+4
| | | | ``OK niallo@'' niallo@
* Simplify rcs_statfile() by having it call rcs_choosefile().ray2006-03-161-59/+17
| | | | ok xsa and niallo
* Move and rename checkin_choose_rcsfile() to rcs_choosefile().ray2006-03-151-1/+126
| | | | ok joris
* Don't assume there is an RCS directory just because the filenameray2006-03-151-9/+4
| | | | | | contains the letters `RCS'. ok niallo
* ci currently doesn't parse the -x flag at all, defaulting to ",v/" everyray2006-03-141-2/+1
| | | | | | | | | | | | | | | | | | | | time. I rewrote checkin_choose_rcsfile() to handle it using these rules: - If a directory structure is given (ci -x,abcd dir/dir2/file) then all RCS files are under dir/dir2. - If the RCS/ directory exists, use it. Otherwise use current directory. - If the -x flag is specified, use those slash-separated extensions. Otherwise, use the default (",v/"). - Look in the rcs directory (RCS/ or current directory) for a file with a matching extension, for each extension. Each extension is tried in order. If a file exists, it is used. If no file exists with any extension, the first one is used. - The empty extension is treated as no extension, because I can't figure out what its special meaning is. It sounds complicated, and the code is kinda complicated as well, but it makes sense if you think about it. ok niallo
* OpenRCS currently strips any text in a filename up to and includingray2006-03-141-5/+1
| | | | | | | the last comma, assuming that it is a `,v' extension. GNU RCS does not do this. This removes that check. ok niallo
* plug a memleak in rcs_set_description()joris2006-03-121-1/+2
| | | | okidoki niallo@
* Now that the last diff went in, we just have to remove some checks inniallo2006-03-111-20/+1
| | | | | | | rcs_set_rev() to get the GNU-like behaviour for ci -l0, ci -u0 etc (admittedly its weird behaviour...but hey, we should support it) ok joris@
* make openrcs use the worklist framework to keep track of temporary filesjoris2006-03-081-1/+19
| | | | | | and remove them in case it gets interrupted. suggested by deraadt@, ok niallo@
* spacing in usage();xsa2006-03-081-3/+3
|
* update usage();jmc2006-03-061-3/+5
|
* move compat flags into a STANDARDS section;jmc2006-03-061-2/+2
| | | | ok niallo xsa
* many spacing cleanupsderaadt2006-03-061-5/+4
|