Deleted Added
full compact
66c66
< libId(keysId, "$Id$")
---
> libId(keysId, "$Id: rcskeys.c,v 1.10 1997/02/22 15:47:38 peter Exp $")
69c69
< char const *const Keyword[] = {
---
> char const *Keyword[] = {
73,74c73,74
< LOCKER, LOG, NAME, RCSFILE, REVISION, SOURCE, STATE,
< FREEBSD
---
> LOCKER, LOG, NAME, RCSFILE, REVISION, SOURCE, STATE, CVSHEADER,
> NULL
78d77
<
82,83c81,82
< true, true, true, true, true, true, true,
< false
---
> true, true, true, true, true, true, true, true,
> true
84a84
> enum markers LocalIdMode = Id;
100a101,102
> if (p == NULL)
> continue;
115a118
> void
117c120
< char *arg;
---
> char const *arg;
120a124
> char *copy, *next;
123,124c127,129
< arg += 2;
< switch (*arg++) {
---
> copy = strdup(arg);
> next = copy;
> switch (*next++) {
132c137,138
< return(false);
---
> free(copy);
> return;
137c143
< key = strtok(arg, ",");
---
> key = strtok(next, ",");
139c145,147
< for (j = sizeof(Keyword)/sizeof(*Keyword); (--j); )
---
> for (j = sizeof(Keyword)/sizeof(*Keyword); (--j); ) {
> if (Keyword[j] == NULL)
> continue;
141a150
> }
144c153,154
< return(true);
---
> free(copy);
> return;
145a156,186
>
> void
> setRCSLocalId(string)
> char const *string;
> /* function: sets local RCS id and RCSLOCALID envariable */
> {
> static char local_id[keylength+1];
> char *copy, *next, *key;
> int j;
>
> copy = strdup(string);
> next = copy;
> key = strtok(next, "=");
> if (strlen(key) > keylength)
> error("LocalId is too long");
> VOID strcpy(local_id, key);
> Keyword[LocalId] = local_id;
>
> /* options? */
> while (key = strtok(NULL, ",")) {
> if (!strcmp(key, Keyword[Id]))
> LocalIdMode=Id;
> else if (!strcmp(key, Keyword[Header]))
> LocalIdMode=Header;
> else if (!strcmp(key, Keyword[CVSHeader]))
> LocalIdMode=CVSHeader;
> else
> error("Unknown LocalId mode");
> }
> free(copy);
> }