Lines Matching defs:cap
108 Cap_t* cap;
159 dropcap(register Cap_t* cap)
163 while (att = cap->att.next)
165 cap->att.next = att->next;
168 free(cap);
179 register Cap_t* cap;
181 while (cap = ent->cap)
183 ent->cap = cap->next;
184 dropcap(cap);
197 register Cap_t* cap;
209 cap = 0;
219 if (cap)
266 if (t <= v && (!cap || !k))
268 if (!cap)
270 if (!(cap = newof(0, Cap_t, 1, strlen(v) + 1)))
274 tta = &cap->att;
276 x = strcopy(tta->value = cap->data, v) + 1;
288 cap->test = att->value;
292 ent = (Ent_t*)dtmatch(mp->cap, s);
293 if (cap)
300 for (pud = 0, dup = ent->cap; dup; pud = dup, dup = dup->next)
301 if (!cap->test && !dup->test || cap->test && dup->test && streq(cap->test, dup->test))
306 pud->next = cap;
308 ent->cap = cap;
309 if (!(cap->next = dup->next))
310 ent->pac = cap;
311 cap = dup;
313 dropcap(cap);
316 ent->pac = ent->pac->next = cap;
323 ent->cap = ent->pac = cap;
324 dtinsert(mp->cap, ent);
328 dtdelete(mp->cap, ent);
396 register Cap_t* cap;
402 for (cap = ent->cap; cap; cap = cap->next)
405 for (att = &cap->att; att; att = att->next)
408 if (att != &cap->att)
440 else if (ent = (Ent_t*)dtmatch(mp->cap, pattern))
443 list(mp->cap, ent, &ws);
447 dtwalk(mp->cap, list, &ws);
574 register Cap_t* cap;
580 if (!(ent = (Ent_t*)dtmatch(mp->cap, type)) && (s = strchr(type, '/')) && (c = s - (char*)type) < sizeof(word))
584 ent = (Ent_t*)dtmatch(mp->cap, word);
588 cap = ent->cap;
590 while (s = cap->test)
666 if (!(cap = cap->next))
669 att = &cap->att;
756 if (!(mp->buf = sfstropen()) || !(mp->cap = dtopen(&mp->dict, Dtoset)))
775 if (mp->cap)
776 dtclose(mp->cap);