vls.h File Reference
#include "common.h"
#include <stdio.h>
#include <sys/types.h>
#include <stddef.h>
#include <stdarg.h>
#include "bu/defines.h"
#include "bu/magic.h"
Include dependency graph for vls.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  bu_vls


#define BU_VLS_NULL   ((struct bu_vls *)0)
#define BU_CK_VLS(_vp)   BU_CKMAG(_vp, BU_VLS_MAGIC, "bu_vls")
#define BU_VLS_INIT(_vp)
#define BU_VLS_INIT_ZERO   { BU_VLS_MAGIC, NULL, 0, 0, 0 }
#define BU_VLS_IS_INITIALIZED(_vp)   (((struct bu_vls *)(_vp) != BU_VLS_NULL) && ((_vp)->vls_magic == BU_VLS_MAGIC))


typedef struct bu_vls bu_vls_t


void bu_vls_init (struct bu_vls *vp)
DEPRECATED void bu_vls_init_if_uninit (struct bu_vls *vp)
struct bu_vlsbu_vls_vlsinit (void)
char * bu_vls_addr (const struct bu_vls *vp)
const char * bu_vls_cstr (const struct bu_vls *vp)
void bu_vls_extend (struct bu_vls *vp, size_t extra)
void bu_vls_setlen (struct bu_vls *vp, size_t newlen)
size_t bu_vls_strlen (const struct bu_vls *vp)
void bu_vls_trunc (struct bu_vls *vp, int len)
void bu_vls_nibble (struct bu_vls *vp, off_t len)
void bu_vls_free (struct bu_vls *vp)
void bu_vls_vlsfree (struct bu_vls *vp)
char * bu_vls_strdup (const struct bu_vls *vp)
char * bu_vls_strgrab (struct bu_vls *vp)
void bu_vls_strcpy (struct bu_vls *vp, const char *s)
void bu_vls_strncpy (struct bu_vls *vp, const char *s, size_t n)
void bu_vls_strcat (struct bu_vls *vp, const char *s)
void bu_vls_strncat (struct bu_vls *vp, const char *s, size_t n)
void bu_vls_vlscat (struct bu_vls *dest, const struct bu_vls *src)
void bu_vls_vlscatzap (struct bu_vls *dest, struct bu_vls *src)
int bu_vls_strcmp (struct bu_vls *s1, struct bu_vls *s2)
int bu_vls_strncmp (struct bu_vls *s1, struct bu_vls *s2, size_t n)
void bu_vls_from_argv (struct bu_vls *vp, int argc, const char *argv[])
void bu_vls_fwrite (FILE *fp, const struct bu_vls *vp)
void bu_vls_write (int fd, const struct bu_vls *vp)
int bu_vls_read (struct bu_vls *vp, int fd)
int bu_vls_gets (struct bu_vls *vp, FILE *fp)
void bu_vls_putc (struct bu_vls *vp, int c)
void bu_vls_trimspace (struct bu_vls *vp)
void bu_vls_printf (struct bu_vls *vls, const char *fmt,...) _BU_ATTR_PRINTF23
void bu_vls_sprintf (struct bu_vls *vls, const char *fmt,...) _BU_ATTR_PRINTF23
void bu_vls_spaces (struct bu_vls *vp, size_t cnt)
size_t bu_vls_print_positions_used (const struct bu_vls *vp)
void bu_vls_detab (struct bu_vls *vp)
void bu_vls_prepend (struct bu_vls *vp, char *str)
void bu_vls_substr (struct bu_vls *dest, const struct bu_vls *src, size_t begin, size_t nchars)
void bu_vls_vprintf (struct bu_vls *vls, const char *fmt, va_list ap)
const char * bu_vls_encode (struct bu_vls *vp, const char *str)
const char * bu_vls_decode (struct bu_vls *vp, const char *str)