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

Go to the source code of this file.

Data Structures

struct  bu_structparse
 
struct  bu_structparse_map
 
struct  bu_external
 

Macros

#define offsetof(_t, _m)   (size_t)(&(((_t *)0)->_m))
 
#define bu_offsetof(_t, _m)   (size_t)offsetof(_t, _m)
 
#define bu_offsetofarray(_t, _a, _d, _i)   bu_offsetof(_t, _a) + sizeof(_d) * _i
 
#define bu_byteoffset(_i)   ((size_t)(((char *)&(_i))-((char *)0)))
 
#define BU_STRUCTPARSE_NULL   ((struct bu_structparse *)0)
 
#define BU_STRUCTPARSE_FUNC_NULL   ((void(*)(const struct bu_structparse *, const char *, void *, const char *, void *))0)
 
#define BU_CK_STRUCTPARSE(_sp)   /* nothing to do */
 
#define BU_STRUCTPARSE_INIT(_sp)
 
#define BU_STRUCTPARSE_INIT_ZERO   { {'\0', '\0', '\0', '\0'}, 0, NULL, 0, BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }
 
#define BU_STRUCTPARSE_IS_INITIALIZED(_sp)   ((struct bu_structparse *)(_sp) != BU_STRUCTPARSE_NULL)
 
#define BU_EXTERNAL_NULL   ((struct bu_external *)0)
 
#define BU_CK_EXTERNAL(_p)   BU_CKMAG(_p, BU_EXTERNAL_MAGIC, "bu_external")
 
#define BU_EXTERNAL_INIT(_p)
 
#define BU_EXTERNAL_INIT_ZERO   { BU_EXTERNAL_MAGIC, 0, NULL }
 
#define BU_EXTERNAL_IS_INITIALIZED(_p)   (((struct bu_external *)(_p) != BU_EXTERNAL_NULL) && (_p)->ext_magic == BU_EXTERNAL_MAGIC)
 
#define BU_SP_SKIP_SEP(_cp)
 

Typedefs

typedef struct bu_structparse bu_structparse_t
 
typedef struct bu_external bu_external_t
 

Functions

int bu_struct_parse (const struct bu_vls *in_vls, const struct bu_structparse *desc, const char *base, void *data)
 
void bu_struct_print (const char *title, const struct bu_structparse *parsetab, const char *base)
 
int bu_struct_export (struct bu_external *ext, const void *base, const struct bu_structparse *imp)
 
int bu_struct_import (void *base, const struct bu_structparse *imp, const struct bu_external *ext, void *data)
 
size_t bu_struct_put (FILE *fp, const struct bu_external *ext)
 
size_t bu_struct_get (struct bu_external *ext, FILE *fp)
 
void bu_struct_wrap_buf (struct bu_external *ext, void *buf)
 
void bu_vls_struct_print (struct bu_vls *vls, const struct bu_structparse *sdp, const char *base)
 
void bu_vls_struct_print2 (struct bu_vls *vls, const char *title, const struct bu_structparse *sdp, const char *base)
 
void bu_vls_struct_item (struct bu_vls *vp, const struct bu_structparse *sdp, const char *base, int sep_char)
 
int bu_vls_struct_item_named (struct bu_vls *vp, const struct bu_structparse *sdp, const char *name, const char *base, int sep_char)
 
void bu_parse_mm (const struct bu_structparse *sdp, const char *name, char *base, const char *value)
 
int bu_key_eq_to_key_val (const char *in, const char **next, struct bu_vls *vls)
 
int bu_shader_to_list (const char *in, struct bu_vls *vls)
 
int bu_shader_to_key_eq (const char *in, struct bu_vls *vls)
 
int bu_fwrite_external (FILE *fp, const struct bu_external *ep)
 
void bu_hexdump_external (FILE *fp, const struct bu_external *ep, const char *str)
 
void bu_free_external (struct bu_external *ep)
 
void bu_copy_external (struct bu_external *op, const struct bu_external *ip)
 
char * bu_next_token (char *str)
 
void bu_structparse_get_terse_form (struct bu_vls *logstr, const struct bu_structparse *sp)
 
int bu_structparse_argv (struct bu_vls *str, int argc, const char **argv, const struct bu_structparse *desc, char *base, void *data)
 
int bu_str_true (const char *str)
 
int bu_str_false (const char *str)