Lines Matching defs:lut
25 * logadm/lut.c -- simple lookup table module
27 * this file contains a very simple lookup table (lut) implementation.
33 * is the datum, is not copied (in fact, the lut routines don't
46 #include "lut.h"
52 struct lut {
53 struct lut *lut_left;
54 struct lut *lut_right;
63 * struct lut *root = NULL;
67 * the *value should not be freed until the lut is freed by lut_free().
69 struct lut *
70 lut_add(struct lut *root, const char *lhs, void *rhs)
94 struct lut **rootp = (struct lut **)arg;
105 struct lut *
106 lut_dup(struct lut *root)
108 struct lut *ret = NULL;
119 lut_lookup(struct lut *root, const char *lhs)
137 lut_walk(struct lut *root,
148 * lut_free -- free a lut
155 lut_free(struct lut *root, void (*callback)(void *rhs))
173 struct lut *root = (struct lut *)arg;
180 * test main for lut module, usage: a.out [lhs[=rhs]...]
185 struct lut *r = NULL;
186 struct lut *dupr = NULL;
199 printf("lut contains:\n");
206 printf("dup lut contains:\n");