diff options
author | svn2git <svn2git@FreeBSD.org> | 1994-07-01 00:00:00 -0800 |
---|---|---|
committer | svn2git <svn2git@FreeBSD.org> | 1994-07-01 00:00:00 -0800 |
commit | 5e0e9b99dc3fc0ecd49d929db0d57c784b66f481 (patch) | |
tree | e779b5a6edddbb949b7990751b12d6f25304ba86 /gnu/usr.bin/rcs/lib | |
parent | a16f65c7d117419bd266c28a1901ef129a337569 (diff) | |
download | src-releng/1.tar.gz src-releng/1.zip |
Release FreeBSD 1.1.5.1release/1.1.5.1_cvsreleng/1
This commit was manufactured to restore the state of the 1.1.5.1-RELEASE image.
Releases prior to 5.3-RELEASE are omitting the secure/ and crypto/ subdirs.
Diffstat (limited to 'gnu/usr.bin/rcs/lib')
-rw-r--r-- | gnu/usr.bin/rcs/lib/Makefile | 2 | ||||
-rw-r--r-- | gnu/usr.bin/rcs/lib/rcsbase.h | 10 | ||||
-rw-r--r-- | gnu/usr.bin/rcs/lib/rcsedit.c | 13 | ||||
-rw-r--r-- | gnu/usr.bin/rcs/lib/rcskeys.c | 61 |
4 files changed, 79 insertions, 7 deletions
diff --git a/gnu/usr.bin/rcs/lib/Makefile b/gnu/usr.bin/rcs/lib/Makefile index 8428686b10ac..a69000b5b2c5 100644 --- a/gnu/usr.bin/rcs/lib/Makefile +++ b/gnu/usr.bin/rcs/lib/Makefile @@ -1,6 +1,6 @@ # Define FSYNC_ALL to get slower but safer writes in case of crashes in # the middle of CVS/RCS changes -CFLAGS += -DFSYNC_ALL +#CFLAGS += -DFSYNC_ALL LIB = rcs SRCS = maketime.c partime.c rcsedit.c rcsfcmp.c rcsfnms.c rcsgen.c \ diff --git a/gnu/usr.bin/rcs/lib/rcsbase.h b/gnu/usr.bin/rcs/lib/rcsbase.h index 4f320465c3f1..746d273dabaf 100644 --- a/gnu/usr.bin/rcs/lib/rcsbase.h +++ b/gnu/usr.bin/rcs/lib/rcsbase.h @@ -2,7 +2,7 @@ /* * RCS common definitions and data structures */ -#define RCSBASE "$Id: rcsbase.h,v 1.1.1.1 1993/06/18 04:22:13 jkh Exp $" +#define RCSBASE "$Id: rcsbase.h,v 1.2 1994/05/14 07:00:20 rgrimes Exp $" /* Copyright (C) 1982, 1988, 1989 Walter Tichy Copyright 1990, 1991 by Paul Eggert @@ -43,6 +43,11 @@ Report problems and direct all questions to: /* $Log: rcsbase.h,v $ + * Revision 1.2 1994/05/14 07:00:20 rgrimes + * Add new option -K from David Dawes that allows you to turn on and off + * specific keyword substitution during a rcs co command. + * Add the new keyword FreeBSD that is IDENTICAL in operation to $Id$. + * * Revision 1.1.1.1 1993/06/18 04:22:13 jkh * Updated GNU utilities * @@ -383,10 +388,11 @@ struct assoc { #define REVISION "Revision" #define SOURCE "Source" #define STATE "State" +#define FREEBSD "FreeBSD" #define keylength 8 /* max length of any of the above keywords */ enum markers { Nomatch, Author, Date, Header, Id, - Locker, Log, RCSfile, Revision, Source, State }; + Locker, Log, RCSfile, Revision, Source, State, FreeBSD }; /* This must be in the same order as rcskeys.c's Keyword[] array. */ #define DELNUMFORM "\n\n%s\n%s\n" diff --git a/gnu/usr.bin/rcs/lib/rcsedit.c b/gnu/usr.bin/rcs/lib/rcsedit.c index 218a8751d16c..3d85320d63a7 100644 --- a/gnu/usr.bin/rcs/lib/rcsedit.c +++ b/gnu/usr.bin/rcs/lib/rcsedit.c @@ -36,6 +36,11 @@ Report problems and direct all questions to: /* $Log: rcsedit.c,v $ + * Revision 1.2 1994/05/14 07:00:22 rgrimes + * Add new option -K from David Dawes that allows you to turn on and off + * specific keyword substitution during a rcs co command. + * Add the new keyword FreeBSD that is IDENTICAL in operation to $Id$. + * * Revision 1.1.1.1 1993/06/18 04:22:12 jkh * Updated GNU utilities * @@ -157,7 +162,7 @@ Report problems and direct all questions to: #include "rcsbase.h" -libId(editId, "$Id: rcsedit.c,v 1.1.1.1 1993/06/18 04:22:12 jkh Exp $") +libId(editId, "$Id: rcsedit.c,v 1.2 1994/05/14 07:00:22 rgrimes Exp $") static void keyreplace P((enum markers,struct hshentry const*,FILE*)); @@ -962,10 +967,14 @@ keyreplace(marker,delta,out) case Date: aputs(date2str(date,datebuf), out); break; + /* + * The FreeBSD keyword is identical to Id. + */ + case FreeBSD: case Id: case Header: aprintf(out, "%s %s %s %s %s", - marker==Id || RCSv<VERSION(4) + marker==Id || marker==FreeBSD || RCSv<VERSION(4) ? basename(RCSfilename) : getfullRCSname(), delta->num, diff --git a/gnu/usr.bin/rcs/lib/rcskeys.c b/gnu/usr.bin/rcs/lib/rcskeys.c index a6e84f64721d..76671226645d 100644 --- a/gnu/usr.bin/rcs/lib/rcskeys.c +++ b/gnu/usr.bin/rcs/lib/rcskeys.c @@ -31,6 +31,20 @@ Report problems and direct all questions to: /* $Log: rcskeys.c,v $ + * Revision 1.4 1994/06/22 00:51:42 rgrimes + * Fix serious off by one error for FreeBSD keyword, this has been driving + * me nuts as it was on by default and that is NOT what I wanted. + * + * Revision 1.3 1994/05/15 22:15:14 rgrimes + * To truely have the OLD behavior of RCS by default make the expansion + * of $FreeBSD$ false by default. This should keep them out + * of the pre 2.x repository. (Or at least make them useless in it). + * + * Revision 1.2 1994/05/14 07:00:23 rgrimes + * Add new option -K from David Dawes that allows you to turn on and off + * specific keyword substitution during a rcs co command. + * Add the new keyword FreeBSD that is IDENTICAL in operation to $Id: rcskeys.c,v 1.4 1994/06/22 00:51:42 rgrimes Exp $. + * * Revision 1.1.1.1 1993/06/18 04:22:12 jkh * Updated GNU utilities * @@ -63,17 +77,26 @@ Report problems and direct all questions to: #include "rcsbase.h" -libId(keysId, "$Id: rcskeys.c,v 1.1.1.1 1993/06/18 04:22:12 jkh Exp $") +libId(keysId, "$Id: rcskeys.c,v 1.4 1994/06/22 00:51:42 rgrimes Exp $") char const *const Keyword[] = { /* This must be in the same order as rcsbase.h's enum markers type. */ nil, AUTHOR, DATE, HEADER, IDH, - LOCKER, LOG, RCSFILE, REVISION, SOURCE, STATE + LOCKER, LOG, RCSFILE, REVISION, SOURCE, STATE, + FREEBSD }; +/* Expand all keywords by default */ + +static int ExpandKeyword[] = { + nil, + true, true, true, true, + true, true, true, true, true, true, + false +}; enum markers trymatch(string) @@ -86,6 +109,8 @@ trymatch(string) register int j; register char const *p, *s; for (j = sizeof(Keyword)/sizeof(*Keyword); (--j); ) { + if (!ExpandKeyword[j]) + continue; /* try next keyword */ p = Keyword[j]; s = string; @@ -103,3 +128,35 @@ trymatch(string) return(Nomatch); } + +setIncExc(arg) + char *arg; +/* Sets up the ExpandKeyword table according to command-line flags */ +{ + char *key; + int include = 0, j; + + arg += 2; + switch (*arg++) { + case 'e': + include = false; + break; + case 'i': + include = true; + break; + default: + return(false); + } + if (include) + for (j = sizeof(Keyword)/sizeof(*Keyword); (--j); ) + ExpandKeyword[j] = false; + key = strtok(arg, ","); + while (key) { + for (j = sizeof(Keyword)/sizeof(*Keyword); (--j); ) + if (!strcmp(key, Keyword[j])) + ExpandKeyword[j] = include; + key = strtok(NULL, ","); + } + return(true); +} + |