Lines Matching refs:tag

67 struct tag {
71 STAILQ_ENTRY(tag) next;
74 static struct tag *tag_new(const char *, rcskey_t);
75 static char *tag_expand(struct tag *, struct diffinfo *);
76 static void tag_free(struct tag *);
79 STAILQ_HEAD(, tag) keywords; /* Enabled keywords. */
108 struct tag *tag;
117 tag = tag_new(tag_defaults[i].ident, tag_defaults[i].key);
118 STAILQ_INSERT_TAIL(&new->keywords, tag, next);
119 len = strlen(tag->ident);
181 struct tag *tag;
186 tag = STAILQ_FIRST(&keyword->keywords);
188 tag_free(tag);
196 struct tag *new, *tag;
198 STAILQ_FOREACH(tag, &keyword->keywords, next) {
199 if (strcmp(tag->ident, rcskey) == 0) {
200 new = tag_new(ident, tag->key);
212 struct tag *tag;
219 STAILQ_FOREACH(tag, &keyword->keywords, next) {
220 if (!all && strcmp(tag->ident, ident) != 0)
222 tag->enabled = 1;
236 struct tag *tag;
243 STAILQ_FOREACH(tag, &keyword->keywords, next) {
244 if (!all && strcmp(tag->ident, ident) != 0)
246 tag->enabled = 0;
261 struct tag *tag, *temp;
263 STAILQ_FOREACH_SAFE(tag, &keyword->keywords, next, temp) {
264 if (!tag->enabled) {
265 STAILQ_REMOVE(&keyword->keywords, tag, tag, next);
266 tag_free(tag);
273 * Expand appropriate RCS keywords. If there's no tag to expand,
283 struct tag *tag;
334 STAILQ_FOREACH(tag, &keyword->keywords, next) {
335 if (strncmp(tag->ident, keystart, valstart - keystart) == 0 &&
336 tag->ident[valstart - keystart] == '\0') {
358 newval = tag_expand(tag, di);
381 newval = tag_expand(tag, di);
428 static struct tag *
431 struct tag *new;
433 new = xmalloc(sizeof(struct tag));
441 tag_free(struct tag *tag)
444 free(tag->ident);
445 free(tag);
449 * Expand a specific tag and return the new value. If NULL
450 * is returned, the tag is empty.
453 tag_expand(struct tag *tag, struct diffinfo *di)
475 switch (tag->key) {