2 * Portions Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC")
3 * Portions Copyright (C) 2001 Internet Software Consortium.
5 * Permission to use, copy, modify, and/or distribute this software for any
6 * purpose with or without fee is hereby granted, provided that the above
7 * copyright notice and this permission notice appear in all copies.
9 * THE SOFTWARE IS PROVIDED "AS IS" AND ISC AND NOMINUM DISCLAIMS ALL
10 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
11 * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY
12 * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 * Portions Copyright (C) 2001 Nominum, Inc.
19 * Permission to use, copy, modify, and/or distribute this software for any
20 * purpose with or without fee is hereby granted, provided that the above
21 * copyright notice and this permission notice appear in all copies.
23 * THE SOFTWARE IS PROVIDED "AS IS" AND ISC AND NOMINUM DISCLAIMS ALL
24 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
25 * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY
26 * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
27 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
28 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
29 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
32 /* $Id: alist.h,v 1.10 2007/08/28 07:20:43 tbox Exp $ */
35 #define ISCCC_ALIST_H 1
37 /*! \file isccc/alist.h */
42 #include <isccc/types.h>
47 isccc_alist_create(void);
50 isccc_alist_alistp(isccc_sexpr_t *alist);
53 isccc_alist_emptyp(isccc_sexpr_t *alist);
56 isccc_alist_first(isccc_sexpr_t *alist);
59 isccc_alist_assq(isccc_sexpr_t *alist, const char *key);
62 isccc_alist_delete(isccc_sexpr_t *alist, const char *key);
65 isccc_alist_define(isccc_sexpr_t *alist, const char *key, isccc_sexpr_t *value);
68 isccc_alist_definestring(isccc_sexpr_t *alist, const char *key, const char *str);
71 isccc_alist_definebinary(isccc_sexpr_t *alist, const char *key, isccc_region_t *r);
74 isccc_alist_lookup(isccc_sexpr_t *alist, const char *key);
77 isccc_alist_lookupstring(isccc_sexpr_t *alist, const char *key, char **strp);
80 isccc_alist_lookupbinary(isccc_sexpr_t *alist, const char *key, isccc_region_t **r);
83 isccc_alist_prettyprint(isccc_sexpr_t *sexpr, unsigned int indent, FILE *stream);
87 #endif /* ISCCC_ALIST_H */