1/* RCS keyword table and match operation */ 2 3/* Copyright 1982, 1988, 1989 Walter Tichy 4 Copyright 1990, 1991, 1992, 1993, 1995 Paul Eggert 5 Distributed under license by the Free Software Foundation, Inc. 6 7This file is part of RCS. 8 --- 49 unchanged lines hidden (view full) --- 58 * Revision 4.1 83/05/04 10:06:53 wft 59 * Initial revision. 60 * 61 */ 62 63 64#include "rcsbase.h" 65 |
66libId(keysId, "$FreeBSD: head/gnu/usr.bin/rcs/lib/rcskeys.c 90399 2002-02-08 11:57:43Z ru $") |
67 68 69char const *Keyword[] = { 70 /* This must be in the same order as rcsbase.h's enum markers type. */ 71 0, 72 AUTHOR, DATE, HEADER, IDH, 73 LOCKER, LOG, NAME, RCSFILE, REVISION, SOURCE, STATE, CVSHEADER, 74 NULL --- 87 unchanged lines hidden (view full) --- 162 static char local_id[keylength+1]; 163 char *copy, *next, *key; 164 int j; 165 166 copy = strdup(string); 167 next = copy; 168 key = strtok(next, "="); 169 if (strlen(key) > keylength) |
170 faterror("LocalId is too long"); |
171 VOID strcpy(local_id, key); 172 Keyword[LocalId] = local_id; 173 174 /* options? */ 175 while (key = strtok(NULL, ",")) { 176 if (!strcmp(key, Keyword[Id])) 177 LocalIdMode=Id; 178 else if (!strcmp(key, Keyword[Header])) 179 LocalIdMode=Header; 180 else if (!strcmp(key, Keyword[CVSHeader])) 181 LocalIdMode=CVSHeader; 182 else 183 error("Unknown LocalId mode"); 184 } 185 free(copy); 186} |