diff options
author | peter <peter@FreeBSD.org> | 1997-05-16 00:12:16 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1997-05-16 00:12:16 +0000 |
commit | 12c4ced9facdc83ee17709502465428fa1b4c5ed (patch) | |
tree | ab25349316e3f8b6fc83e348fb28c42825927caf /contrib/cvs/src/rcs.c | |
parent | 174a377378c64117a2cf5eaf7b0b7116dcd2dded (diff) | |
download | FreeBSD-src-12c4ced9facdc83ee17709502465428fa1b4c5ed.zip FreeBSD-src-12c4ced9facdc83ee17709502465428fa1b4c5ed.tar.gz |
Initial round of support for a local $Id$ keyword in cvs, eg: $FreeBSD$.
This is not complete yet in that it doesn't drive our version of RCS
completely, but it does work fine when you do the appropriate magic.
Obtained from: OpenBSD source tree
Diffstat (limited to 'contrib/cvs/src/rcs.c')
-rw-r--r-- | contrib/cvs/src/rcs.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/contrib/cvs/src/rcs.c b/contrib/cvs/src/rcs.c index 1f73c82..663365b 100644 --- a/contrib/cvs/src/rcs.c +++ b/contrib/cvs/src/rcs.c @@ -2176,7 +2176,7 @@ struct rcs_keyword size_t len; }; #define KEYWORD_INIT(s) (s), sizeof (s) - 1 -static const struct rcs_keyword keywords[] = +static struct rcs_keyword keywords[] = { { KEYWORD_INIT ("Author") }, { KEYWORD_INIT ("Date") }, @@ -2189,6 +2189,7 @@ static const struct rcs_keyword keywords[] = { KEYWORD_INIT ("Revision") }, { KEYWORD_INIT ("Source") }, { KEYWORD_INIT ("State") }, + { NULL, 0 }, { NULL, 0 } }; enum keyword @@ -2203,7 +2204,8 @@ enum keyword KEYWORD_RCSFILE, KEYWORD_REVISION, KEYWORD_SOURCE, - KEYWORD_STATE + KEYWORD_STATE, + KEYWORD_LOCALID }; /* Convert an RCS date string into a readable string. This is like @@ -2340,6 +2342,11 @@ expand_keywords (rcs, ver, name, log, loglen, expand, buf, len, retbuf, retlen) return; } + if (RCS_citag != NULL && keywords[KEYWORD_LOCALID].string == NULL) { + keywords[KEYWORD_LOCALID].string = RCS_citag; + keywords[KEYWORD_LOCALID].len = strlen(RCS_citag); + } + /* If we are using -kkvl, dig out the locker information if any. */ locker = NULL; if (expand == KFLAG_KVL && rcs->other != NULL) @@ -2464,6 +2471,7 @@ expand_keywords (rcs, ver, name, log, loglen, expand, buf, len, retbuf, retlen) case KEYWORD_HEADER: case KEYWORD_ID: + case KEYWORD_LOCALID: { char *path; int free_path; |