Lines Matching defs:data

47  *	Two data structures:
56 * key's data, and a pointer to the next node in the chain.
58 * whose data points to a symbol table header.
100 static struct sym *mknode(struct sym *next, char *key, void *data)
111 n->data = data;
137 static int add_key(SYM sym, char *key, void *data)
142 sym->sym = mknode(NULL, key, data);
149 sn->next = mknode(NULL, key, data);
166 * Add (key, data) to an existing symbol table
173 * "data" is not duplicated and must not point to a static area that could
183 * exhausted, or a key's data element is not a sub-tree
187 * if the last found key's data element is not a sub-tree, return
191 * last node gets 'data'.
194 int sym_put(SYM sym, char *key, void *data, int flags)
215 csym = nsym->data) {
220 if (nsym->data == NULL) { /* fatal error */
225 if (((SYM) (nsym->data))->magic != SYM_MAGIC) {
237 nsym->data = data;
250 add_key(csym, *kk, data); /* last key */
283 csym = nsym->data) {
288 if (nsym->data == NULL) { /* fatal error */
293 if (((SYM) (nsym->data))->magic != SYM_MAGIC) {
303 return (nsym->data);
317 int sym_seq(SYM sym, DBT * key, DBT * data, int flags)
334 csym = (SYM) sym_get(sym, (char *)key->data);
341 key->data = sym->cursor->key;
342 data->data = sym->cursor->data;
350 key->data = sym->cursor->key;
351 data->data = sym->cursor->data;
363 key->data = sym->cursor->key;
364 data->data = sym->cursor->data;
395 sym_dump((SYM) se->data, depth + 1);
401 * sym dump, but data is _always_ a string (print it)
427 if (((SYM) se->data)->magic == SYM_MAGIC) {
429 sym_dump_s((SYM) se->data, depth + 1);
431 printf("(%p) = %s (%p)\n", se->key, (char *)se->data,
432 se->data);
455 sym_rm((SYM) se->data, flags);
460 free(se->data);