diff options
author | Peter Wemm <peter@FreeBSD.org> | 1995-10-29 18:07:04 +0000 |
---|---|---|
committer | Peter Wemm <peter@FreeBSD.org> | 1995-10-29 18:07:04 +0000 |
commit | aac6d1851568ef34387546673f934389ed58f050 (patch) | |
tree | f4f38e61dd6ccfa2bf7dc19addc14cc29dc3fcff /gnu | |
parent | 718c96d308ac65478f24b768151f38339efd4e3c (diff) | |
download | src-aac6d1851568ef34387546673f934389ed58f050.tar.gz src-aac6d1851568ef34387546673f934389ed58f050.zip |
Restore phk's changes from 1.3 - 1.5.. Adds a -v switch to rlog to get it
to print the current version of the RCS files.
Notes
Notes:
svn path=/head/; revision=11926
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/usr.bin/rcs/rlog/rlog.c | 30 |
1 files changed, 26 insertions, 4 deletions
diff --git a/gnu/usr.bin/rcs/rlog/rlog.c b/gnu/usr.bin/rcs/rlog/rlog.c index 7596907d11e9..f07534ee079e 100644 --- a/gnu/usr.bin/rcs/rlog/rlog.c +++ b/gnu/usr.bin/rcs/rlog/rlog.c @@ -29,10 +29,18 @@ Report problems and direct all questions to: /* * $Log: rlog.c,v $ + * Revision 1.8 1995/10/29 17:56:28 peter + * Restore nate's change from rev 1.2; improve readability of the rlog output + * (adds a short row of dashes in a place that CVS and RCS dont mind) + * * Revision 1.7 1995/10/28 21:50:58 peter * First part of import conflict merge from rcs-5.7 import. * - * All those $Log$ entries, combined with the whitespace changes are a real + * All those $Log: rlog.c,v $ + * Revision 1.8 1995/10/29 17:56:28 peter + * Restore nate's change from rev 1.2; improve readability of the rlog output + * (adds a short row of dashes in a place that CVS and RCS dont mind) + * entries, combined with the whitespace changes are a real * pain. * * I'm committing this now, before it's completely finished to get it compiling @@ -229,10 +237,10 @@ static struct rcslockers *lockerlist; static struct stateattri *statelist; -mainProg(rlogId, "rlog", "$Id: rlog.c,v 1.7 1995/10/28 21:50:58 peter Exp $") +mainProg(rlogId, "rlog", "$Id: rlog.c,v 1.8 1995/10/29 17:56:28 peter Exp $") { static char const cmdusage[] = - "\nrlog usage: rlog -{bhLNRt} -ddates -l[lockers] -r[revs] -sstates -Vn -w[logins] -xsuff -zzone file ..."; + "\nrlog usage: rlog -{bhLNRt} -v[string] -ddates -l[lockers] -r[revs] -sstates -Vn -w[logins] -xsuff -zzone file ..."; register FILE *out; char *a, **newargv; @@ -249,9 +257,12 @@ mainProg(rlogId, "rlog", "$Id: rlog.c,v 1.7 1995/10/28 21:50:58 peter Exp $") int pre5; int shownames; int revno; + int versionlist; + char *vstring; descflag = selectflag = shownames = true; - onlylockflag = onlyRCSflag = false; + versionlist = onlylockflag = onlyRCSflag = false; + vstring=0; out = stdout; suffixes = X_DEFAULT; @@ -328,6 +339,11 @@ mainProg(rlogId, "rlog", "$Id: rlog.c,v 1.7 1995/10/28 21:50:58 peter Exp $") setRCSversion(*argv); break; + case 'v': + versionlist = true; + vstring = a; + break; + default: unknown: error("unknown option: %s%s", *argv, cmdusage); @@ -381,6 +397,12 @@ mainProg(rlogId, "rlog", "$Id: rlog.c,v 1.7 1995/10/28 21:50:58 peter Exp $") if (onlylockflag && !Locks) continue; + if ( versionlist ) { + gettree(); + aprintf(out, "%s%s %s\n", vstring, workname, tiprev()); + continue; + } + if ( onlyRCSflag ) { aprintf(out, "%s\n", RCSname); continue; |