Lines Matching defs:lmp
29 static TAILQ_HEAD(lmp_list, lmp) lmp_head = TAILQ_HEAD_INITIALIZER(lmp_head);
30 struct lmp {
34 TAILQ_ENTRY(lmp) lmp_link;
335 struct lmp *lmp;
348 lmp = TAILQ_FIRST(&lmp_head);
349 TAILQ_REMOVE(&lmp_head, lmp, lmp_link);
350 free(lmp->p);
351 lm_free(&lmp->lml);
352 free(lmp);
448 struct lmp *lmp;
452 TAILQ_FOREACH(lmp, &lmp_head, lmp_link) {
453 if ((lmp->type == T_EXACT && strcmp(n, lmp->p) == 0) ||
454 (lmp->type == T_DIRECTORY && strncmp(n, lmp->p,
455 strlen(lmp->p)) == 0) ||
456 (lmp->type == T_BASENAME && strcmp(quickbasename(n),
457 lmp->p) == 0))
458 return (&lmp->lml);
466 struct lmp *lmp;
470 lmp = xmalloc(sizeof(struct lmp));
471 lmp->p = n;
473 lmp->type = T_DIRECTORY;
475 lmp->type = T_BASENAME;
477 lmp->type = T_EXACT;
478 TAILQ_INIT(&lmp->lml);
479 TAILQ_INSERT_HEAD(&lmp_head, lmp, lmp_link);
481 return (&lmp->lml);