diff options
author | Peter Wemm <peter@FreeBSD.org> | 1995-10-29 19:31:11 +0000 |
---|---|---|
committer | Peter Wemm <peter@FreeBSD.org> | 1995-10-29 19:31:11 +0000 |
commit | 9968a350e97065d9d1e1d17b46ac04344b261aba (patch) | |
tree | aa4cd4749538da32af87cd6c7c2697adfbb57748 /gnu/usr.bin | |
parent | aac6d1851568ef34387546673f934389ed58f050 (diff) | |
download | src-test2-9968a350e97065d9d1e1d17b46ac04344b261aba.tar.gz src-test2-9968a350e97065d9d1e1d17b46ac04344b261aba.zip |
Notes
Diffstat (limited to 'gnu/usr.bin')
-rw-r--r-- | gnu/usr.bin/rcs/co/co.c | 19 | ||||
-rw-r--r-- | gnu/usr.bin/rcs/lib/rcsbase.h | 15 | ||||
-rw-r--r-- | gnu/usr.bin/rcs/lib/rcsedit.c | 15 | ||||
-rw-r--r-- | gnu/usr.bin/rcs/lib/rcskeys.c | 54 |
4 files changed, 95 insertions, 8 deletions
diff --git a/gnu/usr.bin/rcs/co/co.c b/gnu/usr.bin/rcs/co/co.c index 4e6b8c40aecd..03cd8c905e8e 100644 --- a/gnu/usr.bin/rcs/co/co.c +++ b/gnu/usr.bin/rcs/co/co.c @@ -29,6 +29,16 @@ Report problems and direct all questions to: /* * $Log: co.c,v $ + * Revision 1.4 1995/10/28 21:49:12 peter + * First part of import conflict merge from rcs-5.7 import. + * + * All those $Log$ entries, combined with the whitespace changes are a real + * pain. + * + * I'm committing this now, before it's completely finished to get it compiling + * and working again ASAP. Some of the FreeBSD specific features are not working + * in this commit yet (mainly rlog stuff and $FreeBSD$ support) + * * Revision 5.18 1995/06/16 06:19:24 eggert * Update FSF address. * @@ -179,7 +189,7 @@ static void cleanup P((void)); static char const quietarg[] = "-q"; -static char const *expandarg, *suffixarg, *versionarg, *zonearg; +static char const *expandarg, *suffixarg, *versionarg, *zonearg, *incexcarg; static char const **joinlist; /* revisions to be joined */ static int joinlength; static FILE *neworkptr; @@ -192,7 +202,7 @@ static struct hshentries *gendeltas; /* deltas to be generated */ static struct hshentry *targetdelta; /* final delta to be generated */ static struct stat workstat; -mainProg(coId, "co", "$Id: co.c,v 5.18 1995/06/16 06:19:24 eggert Exp $") +mainProg(coId, "co", "$Id: co.c,v 1.4 1995/10/28 21:49:12 peter Exp $") { static char const cmdusage[] = "\nco usage: co -{fIlMpqru}[rev] -ddate -jjoins -ksubst -sstate -T -w[who] -Vn -xsuff -zzone file ..."; @@ -315,6 +325,11 @@ mainProg(coId, "co", "$Id: co.c,v 5.18 1995/06/16 06:19:24 eggert Exp $") zone_set(a); break; + case 'K': /* set keyword inclusions/exclusions */ + incexcarg = *argv; + setIncExc(incexcarg); + break; + case 'k': /* set keyword expand mode */ expandarg = *argv; if (0 <= expmode) redefined('k'); diff --git a/gnu/usr.bin/rcs/lib/rcsbase.h b/gnu/usr.bin/rcs/lib/rcsbase.h index 36ef8abc100e..d3ad2762e3e8 100644 --- a/gnu/usr.bin/rcs/lib/rcsbase.h +++ b/gnu/usr.bin/rcs/lib/rcsbase.h @@ -1,6 +1,6 @@ /* RCS common definitions and data structures */ -#define RCSBASE "$Id: rcsbase.h,v 5.20 1995/06/16 06:19:24 eggert Exp $" +#define RCSBASE "$Id: rcsbase.h,v 1.4 1995/10/28 21:49:34 peter Exp $" /* Copyright 1982, 1988, 1989 Walter Tichy Copyright 1990, 1991, 1992, 1993, 1994, 1995 Paul Eggert @@ -31,6 +31,16 @@ Report problems and direct all questions to: /* * $Log: rcsbase.h,v $ + * Revision 1.4 1995/10/28 21:49:34 peter + * First part of import conflict merge from rcs-5.7 import. + * + * All those $Log$ entries, combined with the whitespace changes are a real + * pain. + * + * I'm committing this now, before it's completely finished to get it compiling + * and working again ASAP. Some of the FreeBSD specific features are not working + * in this commit yet (mainly rlog stuff and $FreeBSD$ support) + * * Revision 5.20 1995/06/16 06:19:24 eggert * Update FSF address. * @@ -427,10 +437,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, Name, RCSfile, Revision, Source, State }; + Locker, Log, Name, 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 79408f315296..ce8b1d070955 100644 --- a/gnu/usr.bin/rcs/lib/rcsedit.c +++ b/gnu/usr.bin/rcs/lib/rcsedit.c @@ -36,6 +36,16 @@ Report problems and direct all questions to: /* * $Log: rcsedit.c,v $ + * Revision 1.4 1995/10/28 21:49:36 peter + * First part of import conflict merge from rcs-5.7 import. + * + * All those $Log$ entries, combined with the whitespace changes are a real + * pain. + * + * I'm committing this now, before it's completely finished to get it compiling + * and working again ASAP. Some of the FreeBSD specific features are not working + * in this commit yet (mainly rlog stuff and $FreeBSD$ support) + * * Revision 5.19 1995/06/16 06:19:24 eggert * Update FSF address. * @@ -202,7 +212,7 @@ Report problems and direct all questions to: #include "rcsbase.h" -libId(editId, "$Id: rcsedit.c,v 5.19 1995/06/16 06:19:24 eggert Exp $") +libId(editId, "$Id: rcsedit.c,v 1.4 1995/10/28 21:49:36 peter Exp $") static void editEndsPrematurely P((void)) exiting; static void editLineNumberOverflow P((void)) exiting; @@ -1049,10 +1059,11 @@ keyreplace(marker, delta, delimstuffed, infile, out, dolog) case Date: aputs(date2str(date,datebuf), out); break; + case FreeBSD: case Id: case Header: escape_string(out, - marker==Id || RCSv<VERSION(4) + marker==Id || marker==FreeBSD || RCSv<VERSION(4) ? basefilename(RCSname) : getfullRCSname() ); diff --git a/gnu/usr.bin/rcs/lib/rcskeys.c b/gnu/usr.bin/rcs/lib/rcskeys.c index 9ef0adf4eba4..6b9d690d068b 100644 --- a/gnu/usr.bin/rcs/lib/rcskeys.c +++ b/gnu/usr.bin/rcs/lib/rcskeys.c @@ -29,6 +29,16 @@ Report problems and direct all questions to: /* * $Log: rcskeys.c,v $ + * Revision 1.6 1995/10/28 21:49:45 peter + * First part of import conflict merge from rcs-5.7 import. + * + * All those $Log$ entries, combined with the whitespace changes are a real + * pain. + * + * I'm committing this now, before it's completely finished to get it compiling + * and working again ASAP. Some of the FreeBSD specific features are not working + * in this commit yet (mainly rlog stuff and $FreeBSD$ support) + * * Revision 5.4 1995/06/16 06:19:24 eggert * Update FSF address. * @@ -64,17 +74,25 @@ Report problems and direct all questions to: #include "rcsbase.h" -libId(keysId, "$Id: rcskeys.c,v 5.4 1995/06/16 06:19:24 eggert Exp $") +libId(keysId, "$Id: rcskeys.c,v 1.6 1995/10/28 21:49:45 peter Exp $") char const *const Keyword[] = { /* This must be in the same order as rcsbase.h's enum markers type. */ 0, AUTHOR, DATE, HEADER, IDH, - LOCKER, LOG, NAME, RCSFILE, REVISION, SOURCE, STATE + LOCKER, LOG, NAME, RCSFILE, REVISION, SOURCE, STATE, + FREEBSD }; +/* Expand all keywords by default */ +static int ExpandKeyword[] = { + false, + true, true, true, true, + true, true, true, true, true, true, true, + false +}; enum markers trymatch(string) @@ -87,6 +105,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; @@ -104,3 +124,33 @@ 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); +} |