Lines Matching defs:alist

32 /* $Id: alist.c,v 1.8 2007/08/28 07:20:43 tbox Exp $ */
41 #include <isccc/alist.h>
50 #define ALIST_TAG "*alist*"
59 isccc_sexpr_t *alist, *tag;
64 alist = isccc_sexpr_cons(tag, NULL);
65 if (alist == NULL) {
70 return (alist);
74 isccc_alist_alistp(isccc_sexpr_t *alist)
78 if (alist == NULL || alist->type != ISCCC_SEXPRTYPE_DOTTEDPAIR)
80 car = CAR(alist);
89 isccc_alist_emptyp(isccc_sexpr_t *alist)
91 REQUIRE(isccc_alist_alistp(alist));
93 if (CDR(alist) == NULL)
99 isccc_alist_first(isccc_sexpr_t *alist)
101 REQUIRE(isccc_alist_alistp(alist));
103 return (CDR(alist));
107 isccc_alist_assq(isccc_sexpr_t *alist, const char *key)
111 REQUIRE(isccc_alist_alistp(alist));
114 * Skip alist type tag.
116 alist = CDR(alist);
118 while (alist != NULL) {
119 INSIST(alist->type == ISCCC_SEXPRTYPE_DOTTEDPAIR);
120 car = CAR(alist);
126 alist = CDR(alist);
133 isccc_alist_delete(isccc_sexpr_t *alist, const char *key)
137 REQUIRE(isccc_alist_alistp(alist));
139 prev = alist;
140 rest = CDR(alist);
159 isccc_alist_define(isccc_sexpr_t *alist, const char *key, isccc_sexpr_t *value)
163 kv = isccc_alist_assq(alist, key);
176 elt = isccc_sexpr_addtolist(&alist, kv);
193 isccc_alist_definestring(isccc_sexpr_t *alist, const char *key, const char *str)
200 kv = isccc_alist_define(alist, key, v);
208 isccc_alist_definebinary(isccc_sexpr_t *alist, const char *key, isccc_region_t *r)
215 kv = isccc_alist_define(alist, key, v);
223 isccc_alist_lookup(isccc_sexpr_t *alist, const char *key)
227 kv = isccc_alist_assq(alist, key);
234 isccc_alist_lookupstring(isccc_sexpr_t *alist, const char *key, char **strp)
238 kv = isccc_alist_assq(alist, key);
253 isccc_alist_lookupbinary(isccc_sexpr_t *alist, const char *key, isccc_region_t **r)
257 kv = isccc_alist_assq(alist, key);