1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
$NetBSD: patch-ae,v 1.9 2005/03/01 15:36:48 wiz Exp $
--- src/rcs.c.orig 2005-01-31 23:15:08.000000000 +0100
+++ src/rcs.c
@@ -3498,7 +3498,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") },
@@ -3511,6 +3511,7 @@ static const struct rcs_keyword keywords
{ KEYWORD_INIT ("Revision") },
{ KEYWORD_INIT ("Source") },
{ KEYWORD_INIT ("State") },
+ { NULL, 0 },
{ NULL, 0 }
};
enum keyword
@@ -3525,7 +3526,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
@@ -3662,6 +3664,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)
@@ -3753,6 +3760,7 @@ expand_keywords (rcs, ver, name, log, lo
case KEYWORD_HEADER:
case KEYWORD_ID:
+ case KEYWORD_LOCALID:
{
const char *path;
int free_path;
@@ -4402,7 +4410,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)
|