$NetBSD: patch-ae,v 1.11 2006/01/29 02:40:40 wiz Exp $ --- src/rcs.c.orig 2005-09-26 16:31:36.000000000 +0200 +++ src/rcs.c @@ -3534,7 +3534,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") }, @@ -3547,6 +3547,7 @@ static const struct rcs_keyword keywords { KEYWORD_INIT ("Revision") }, { KEYWORD_INIT ("Source") }, { KEYWORD_INIT ("State") }, + { NULL, 0 }, { NULL, 0 } }; enum keyword @@ -3561,7 +3562,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 @@ -3698,6 +3700,11 @@ expand_keywords (rcs, ver, name, log, lo return; } + if (RCS_citag != 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) @@ -3789,6 +3796,7 @@ expand_keywords (rcs, ver, name, log, lo case KEYWORD_HEADER: case KEYWORD_ID: + case KEYWORD_LOCALID: { const char *path; int free_path; @@ -4462,7 +4470,7 @@ RCS_checkout (rcs, workfile, rev, nameta if (info != NULL) { /* If the size of `devtype' changes, fix the sscanf call also */ - char devtype[16]; + char devtype[16+1]; if (sscanf (info->data, "%15s %lu", devtype, &devnum_long) < 2)