35 #define IS_XML1CHAR(x) (isalpha(x) || (x == '_') || (x == ':'))
36 #define IS_XMLCHAR(x) (isalpha(x) || isdigit(x) || (x == '.') || (x == '-') || (x == '_') || (x == ':'))
38 #define hpx_init_simple() hpx_init(0, 10*1024*1024)
40 #define MMAP_PAGES (1L << 15)
43 typedef struct hpx_ctrl
70 typedef struct hpx_attr
77 typedef struct hpx_tag
87 typedef struct hpx_tree
92 struct hpx_tree *subtag[];
97 HPX_ILL, HPX_OPEN, HPX_SINGLE, HPX_CLOSE, HPX_LITERAL, HPX_ATT, HPX_INSTR, HPX_COMMENT
101 long hpx_lineno(
void);
111 int hpx_fprintf_tag(FILE *f,
const hpx_tag_t *p);
long pos
current working position
Definition: libhpxml.h:55
long hpx_get_eleml(hpx_ctrl_t *ctl, bstringl_t *b, int *in_tag, long *lno)
Definition: libhpxml.c:552
long pg_siz
system page size
Definition: libhpxml.h:65
short empty
flag set if data should be read from file
Definition: libhpxml.h:59
hpx_ctrl_t * hpx_init(int fd, long len)
Definition: libhpxml.c:457
int in_tag
flag to deter if next element is in or out of tag
Definition: libhpxml.h:57
short eof
flag set if eof
Definition: libhpxml.h:51
short mmap
flag set if data is memory mapped
Definition: libhpxml.h:61
long pg_blk_siz
length of advised region (multiple of sysconf(_SC_PAGESIZE))
Definition: libhpxml.h:67
void hpx_init_membuf(hpx_ctrl_t *ctl, void *buf, int len)
Definition: libhpxml.c:519
long len
total length of buffer
Definition: libhpxml.h:53
void hpx_tm_free_tree(hpx_tree_t *)
Definition: libhpxml.c:72
Definition: libhpxml.h:70
Definition: libhpxml.h:77
int fd
file descriptor of input file
Definition: libhpxml.h:49
bstring_t value
name of attribute
Definition: libhpxml.h:73
char delim
value of attribute
Definition: libhpxml.h:74
char * madv_ptr
pointer to madvise()'d region (MADV_WILLNEED)
Definition: libhpxml.h:63
int hpx_process_elem(bstring_t b, hpx_tag_t *p)
Definition: libhpxml.c:173
Definition: libhpxml.h:87
Definition: libhpxml.h:43
int hpx_tree_resize(hpx_tree_t **tl, int n)
Definition: libhpxml.c:708