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.5 2003/07/12 09:19:18 wiz Exp $
--- src/rcs.c.orig Tue Mar 18 01:28:06 2003
+++ src/rcs.c
@@ -3394,7 +3394,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") },
@@ -3407,6 +3407,7 @@ static const struct rcs_keyword keywords
{ KEYWORD_INIT ("Revision") },
{ KEYWORD_INIT ("Source") },
{ KEYWORD_INIT ("State") },
+ { NULL, 0 },
{ NULL, 0 }
};
enum keyword
@@ -3421,7 +3422,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
@@ -3558,6 +3560,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)
@@ -3649,6 +3656,7 @@ expand_keywords (rcs, ver, name, log, lo
case KEYWORD_HEADER:
case KEYWORD_ID:
+ case KEYWORD_LOCALID:
{
char *path;
int free_path;
@@ -4281,7 +4289,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)
|