61#define BU_VLS_NULL ((struct bu_vls *)0)
66#define BU_CK_VLS(_vp) BU_CKMAG(_vp, BU_VLS_MAGIC, "bu_vls")
71#define BU_VLS_INIT(_vp) { \
72 (_vp)->vls_magic = BU_VLS_MAGIC; \
73 (_vp)->vls_str = NULL; \
74 (_vp)->vls_offset = (_vp)->vls_len = (_vp)->vls_max = 0; \
81#define BU_VLS_INIT_ZERO { BU_VLS_MAGIC, NULL, 0, 0, 0 }
89#define BU_VLS_IS_INITIALIZED(_vp) (((struct bu_vls *)(_vp) != BU_VLS_NULL) && ((_vp)->vls_magic == BU_VLS_MAGIC))
231 const struct bu_vls *src);
389 size_t begin,
size_t nchars);
Header file for the BRL-CAD common definitions.
#define _BU_ATTR_PRINTF23
void bu_vls_putc(struct bu_vls *vp, int c)
int bu_vls_read(struct bu_vls *vp, int fd)
int(* bu_vls_uniq_t)(struct bu_vls *v, void *data)
char * bu_vls_strdup(const struct bu_vls *vp)
void bu_vls_trimspace(struct bu_vls *vp)
void bu_vls_from_argv(struct bu_vls *vp, int argc, const char *argv[])
void bu_vls_vlsfree(struct bu_vls *vp)
char * bu_vls_strgrab(struct bu_vls *vp)
void bu_vls_vlscat(struct bu_vls *dest, const struct bu_vls *src)
void bu_vls_free(struct bu_vls *vp)
const char * bu_vls_encode(struct bu_vls *vp, const char *str)
Routines to encode/decode strings into bu_vls structures.
struct bu_vls * bu_vls_vlsinit(void)
void bu_vls_write(int fd, const struct bu_vls *vp)
int bu_vls_strcmp(struct bu_vls *s1, struct bu_vls *s2)
void bu_vls_sprintf(struct bu_vls *vls, const char *fmt,...) _BU_ATTR_PRINTF23
char * bu_vls_addr(const struct bu_vls *vp)
void bu_vls_init(struct bu_vls *vp)
void bu_vls_prepend(struct bu_vls *vp, const char *str)
int bu_vls_strncmp(struct bu_vls *s1, struct bu_vls *s2, size_t n)
void bu_vls_printf(struct bu_vls *vls, const char *fmt,...) _BU_ATTR_PRINTF23
void bu_vls_fwrite(FILE *fp, const struct bu_vls *vp)
void bu_vls_spaces(struct bu_vls *vp, size_t cnt)
const char * bu_vls_decode(struct bu_vls *vp, const char *str)
void bu_vls_strncat(struct bu_vls *vp, const char *s, size_t n)
int bu_vls_simplify(struct bu_vls *vp, const char *keep, const char *de_dup, const char *trim)
Automatic string generation routines.
void bu_vls_nibble(struct bu_vls *vp, b_off_t len)
int bu_vls_gets(struct bu_vls *vp, FILE *fp)
void bu_vls_detab(struct bu_vls *vp)
void bu_vls_trunc(struct bu_vls *vp, int len)
void bu_vls_vlscatzap(struct bu_vls *dest, struct bu_vls *src)
void bu_vls_extend(struct bu_vls *vp, size_t extra)
void bu_vls_strcpy(struct bu_vls *vp, const char *s)
void bu_vls_setlen(struct bu_vls *vp, size_t newlen)
void bu_vls_substr(struct bu_vls *dest, const struct bu_vls *src, size_t begin, size_t nchars)
int bu_vls_incr(struct bu_vls *name, const char *regex_str, const char *incr_spec, bu_vls_uniq_t uniq_test, void *data)
void bu_vls_strcat(struct bu_vls *vp, const char *s)
void bu_vls_vprintf(struct bu_vls *vls, const char *fmt, va_list ap)
bu_vls_vprintf implementation
DEPRECATED void bu_vls_init_if_uninit(struct bu_vls *vp)
size_t bu_vls_strlen(const struct bu_vls *vp)
void bu_vls_strncpy(struct bu_vls *vp, const char *s, size_t n)
const char * bu_vls_cstr(const struct bu_vls *vp)
size_t bu_vls_print_positions_used(const struct bu_vls *vp)
Global registry of recognized magic numbers.