28#if defined(USE_BINARY_ATTRIBUTES)
69#if defined(USE_BINARY_ATTRIBUTES)
71 unsigned int binvaluelen;
72 const unsigned char *binvalue;
98#define BU_AVS_NULL ((struct bu_attribute_value_set *)0)
103#define BU_CK_AVS(_ap) BU_CKMAG(_ap, BU_AVS_MAGIC, "bu_attribute_value_set")
108#define BU_AVS_INIT(_ap) { \
109 (_ap)->magic = BU_AVS_MAGIC; \
110 (_ap)->count = (_ap)->max = 0; \
111 (_ap)->readonly_min = (_ap)->readonly_max = (_ap)->avp = NULL; \
118#define BU_AVS_INIT_ZERO { BU_AVS_MAGIC, 0, 0, NULL, NULL, NULL }
124#define BU_AVS_IS_INITIALIZED(_ap) (((struct bu_attribute_value_set *)(_ap) != BU_AVS_NULL) && LIKELY((_ap)->magic == BU_AVS_MAGIC))
147#define BU_AVS_FOR(_pp, _avp) \
148 (_pp) = ((const void *)(_avp) != (const void *)NULL) ? ((_avp)->count > 0 ? &(_avp)->avp[(_avp)->count-1] : NULL) : NULL; ((const void *)(_pp) != (const void *)NULL) && ((const void *)(_avp) != (const void *)NULL) && (_avp)->avp && (_pp) >= (_avp)->avp; (_pp)--
156#define AVS_IS_FREEABLE(_avsp, _p) \
157 ((_avsp)->readonly_max == NULL \
158 || (const void *)(_p) < (_avsp)->readonly_min \
159 || (const void *)(_p) > (_avsp)->readonly_max)
192 const char *attribute,
200 const char *attribute,
201 const struct bu_vls *value_vls);
207 const char *attribute,
223 const char *attribute);
235 const char *attribute);
Header file for the BRL-CAD common definitions.
void bu_avs_init(struct bu_attribute_value_set *avp, size_t len, const char *str)
int bu_avs_add_vls(struct bu_attribute_value_set *avp, const char *attribute, const struct bu_vls *value_vls)
struct bu_attribute_value_set * bu_avs_new(size_t len, const char *str)
const char * bu_avs_get(const struct bu_attribute_value_set *avp, const char *attribute)
void bu_avs_add_nonunique(struct bu_attribute_value_set *avsp, const char *attribute, const char *value)
void bu_avs_init_empty(struct bu_attribute_value_set *avp)
void bu_avs_free(struct bu_attribute_value_set *avp)
int bu_avs_remove(struct bu_attribute_value_set *avp, const char *attribute)
void bu_avs_merge(struct bu_attribute_value_set *dest, const struct bu_attribute_value_set *src)
void bu_avs_print(const struct bu_attribute_value_set *avp, const char *title)
int bu_avs_add(struct bu_attribute_value_set *avp, const char *attribute, const char *value)
Global registry of recognized magic numbers.
struct bu_attribute_value_pair * avp