#include <stdio.h>
#include <isc/lang.h>
#include <isccc/types.h>
Go to the source code of this file.
Definition in file sexpr.h.
#define ISCCC_SEXPRTYPE_T 0x01 |
#define ISCCC_SEXPRTYPE_STRING 0x02 |
Definition at line 64 of file sexpr.h.
Referenced by isccc_alist_alistp(), isccc_alist_assq(), isccc_alist_delete(), isccc_sexpr_free(), isccc_sexpr_fromstring(), isccc_sexpr_print(), isccc_sexpr_stringp(), and isccc_sexpr_tostring().
#define ISCCC_SEXPRTYPE_DOTTEDPAIR 0x03 |
Definition at line 65 of file sexpr.h.
Referenced by isccc_alist_alistp(), isccc_alist_assq(), isccc_alist_delete(), isccc_sexpr_addtolist(), isccc_sexpr_car(), isccc_sexpr_cdr(), isccc_sexpr_cons(), isccc_sexpr_free(), isccc_sexpr_listp(), isccc_sexpr_print(), isccc_sexpr_setcar(), and isccc_sexpr_setcdr().
#define ISCCC_SEXPRTYPE_BINARY 0x04 |
Definition at line 66 of file sexpr.h.
Referenced by isccc_sexpr_binaryp(), isccc_sexpr_free(), isccc_sexpr_frombinary(), isccc_sexpr_print(), isccc_sexpr_tobinary(), and isccc_sexpr_tostring().
Definition at line 69 of file sexpr.h.
Referenced by isccc_cc_lookupstring(), isccc_cc_lookupuint32(), list_towire(), and table_towire().
isccc_sexpr_t* isccc_sexpr_cons | ( | isccc_sexpr_t * | car, | |
isccc_sexpr_t * | cdr | |||
) |
Definition at line 52 of file sexpr.c.
References CAR, CDR, ISCCC_SEXPRTYPE_DOTTEDPAIR, and isccc_sexpr::type.
Referenced by isccc_alist_create(), isccc_alist_define(), and isccc_sexpr_addtolist().
isccc_sexpr_t* isccc_sexpr_tconst | ( | void | ) |
isccc_sexpr_t* isccc_sexpr_fromstring | ( | const char * | str | ) |
Definition at line 73 of file sexpr.c.
References isccc_sexpr::as_string, free(), ISCCC_SEXPRTYPE_STRING, strdup(), isccc_sexpr::type, and isccc_sexpr::value.
Referenced by isccc_alist_create(), isccc_alist_define(), and isccc_alist_definestring().
isccc_sexpr_t* isccc_sexpr_frombinary | ( | const isccc_region_t * | region | ) |
Definition at line 91 of file sexpr.c.
References isccc_sexpr::as_region, free(), ISCCC_SEXPRTYPE_BINARY, REGION_SIZE, isccc_region::rend, isccc_region::rstart, isccc_sexpr::type, and isccc_sexpr::value.
Referenced by isccc_alist_definebinary(), and value_fromwire().
void isccc_sexpr_free | ( | isccc_sexpr_t ** | sexprp | ) |
Definition at line 125 of file sexpr.c.
References isccc_sexpr::as_region, isccc_sexpr::as_string, CAR, CDR, free(), isccc_sexpr_free(), ISCCC_SEXPRTYPE_BINARY, ISCCC_SEXPRTYPE_DOTTEDPAIR, ISCCC_SEXPRTYPE_STRING, isccc_region::rstart, isccc_sexpr::type, and isccc_sexpr::value.
Referenced by control_recvmessage(), createmessage(), isccc_alist_create(), isccc_alist_define(), isccc_alist_definebinary(), isccc_alist_definestring(), isccc_alist_delete(), isccc_cc_createack(), isccc_cc_createresponse(), isccc_sexpr_free(), list_fromwire(), rndc_recvdone(), rndc_recvnonce(), and table_fromwire().
void isccc_sexpr_print | ( | isccc_sexpr_t * | sexpr, | |
FILE * | stream | |||
) |
Definition at line 170 of file sexpr.c.
References isccc_sexpr::as_region, isccc_sexpr::as_string, CAR, CDR, INSIST, isccc_sexpr_print(), ISCCC_SEXPRTYPE_BINARY, ISCCC_SEXPRTYPE_DOTTEDPAIR, ISCCC_SEXPRTYPE_STRING, ISCCC_SEXPRTYPE_T, printable(), REGION_SIZE, isccc_region::rstart, isccc_sexpr::type, and isccc_sexpr::value.
Referenced by isccc_alist_prettyprint(), and isccc_sexpr_print().
isccc_sexpr_t* isccc_sexpr_car | ( | isccc_sexpr_t * | list | ) |
Definition at line 222 of file sexpr.c.
References CAR, ISCCC_SEXPRTYPE_DOTTEDPAIR, REQUIRE, and isccc_sexpr::type.
isccc_sexpr_t* isccc_sexpr_cdr | ( | isccc_sexpr_t * | list | ) |
Definition at line 230 of file sexpr.c.
References CDR, ISCCC_SEXPRTYPE_DOTTEDPAIR, REQUIRE, and isccc_sexpr::type.
void isccc_sexpr_setcar | ( | isccc_sexpr_t * | pair, | |
isccc_sexpr_t * | car | |||
) |
Definition at line 238 of file sexpr.c.
References CAR, ISCCC_SEXPRTYPE_DOTTEDPAIR, REQUIRE, and isccc_sexpr::type.
void isccc_sexpr_setcdr | ( | isccc_sexpr_t * | pair, | |
isccc_sexpr_t * | cdr | |||
) |
Definition at line 246 of file sexpr.c.
References CDR, ISCCC_SEXPRTYPE_DOTTEDPAIR, REQUIRE, and isccc_sexpr::type.
isccc_sexpr_t* isccc_sexpr_addtolist | ( | isccc_sexpr_t ** | l1p, | |
isccc_sexpr_t * | l2 | |||
) |
Definition at line 254 of file sexpr.c.
References CDR, isccc_sexpr_cons(), ISCCC_SEXPRTYPE_DOTTEDPAIR, REQUIRE, and isccc_sexpr::type.
Referenced by isccc_alist_define(), and list_fromwire().
isc_boolean_t isccc_sexpr_listp | ( | isccc_sexpr_t * | sexpr | ) |
Definition at line 277 of file sexpr.c.
References ISC_FALSE, ISC_TRUE, ISCCC_SEXPRTYPE_DOTTEDPAIR, and isccc_sexpr::type.
Referenced by isccc_alist_prettyprint(), and value_towire().
isc_boolean_t isccc_sexpr_emptyp | ( | isccc_sexpr_t * | sexpr | ) |
isc_boolean_t isccc_sexpr_stringp | ( | isccc_sexpr_t * | sexpr | ) |
Definition at line 293 of file sexpr.c.
References ISC_FALSE, ISC_TRUE, ISCCC_SEXPRTYPE_STRING, and isccc_sexpr::type.
Referenced by isccc_alist_lookupstring(), and isccc_alist_prettyprint().
isc_boolean_t isccc_sexpr_binaryp | ( | isccc_sexpr_t * | sexpr | ) |
Definition at line 301 of file sexpr.c.
References ISC_FALSE, ISC_TRUE, ISCCC_SEXPRTYPE_BINARY, and isccc_sexpr::type.
Referenced by isccc_alist_lookupbinary(), isccc_cc_lookupstring(), isccc_cc_lookupuint32(), and value_towire().
char* isccc_sexpr_tostring | ( | isccc_sexpr_t * | sexpr | ) |
Definition at line 309 of file sexpr.c.
References isccc_sexpr::as_region, isccc_sexpr::as_string, ISCCC_SEXPRTYPE_BINARY, ISCCC_SEXPRTYPE_STRING, REQUIRE, isccc_region::rstart, isccc_sexpr::type, and isccc_sexpr::value.
Referenced by isccc_alist_lookupstring(), isccc_alist_prettyprint(), isccc_cc_lookupstring(), isccc_cc_lookupuint32(), table_towire(), and verify().
isccc_region_t* isccc_sexpr_tobinary | ( | isccc_sexpr_t * | sexpr | ) |
Definition at line 321 of file sexpr.c.
References isccc_sexpr::as_region, ISCCC_SEXPRTYPE_BINARY, REQUIRE, isccc_sexpr::type, and isccc_sexpr::value.
Referenced by isccc_alist_lookupbinary(), and value_towire().