<libroxml  version="2.2.1" />
contact: tristan.lelong@libroxml.net
roxml-types.h
Go to the documentation of this file.
1 
23 #ifndef ROXML_TYPES_H
24 #define ROXML_TYPES_H
25 
26 #ifdef _WIN32
27 #include "roxml_win32_native.h"
28 #else
29 #include <pthread.h>
30 #endif
31 
40 typedef int(*roxml_parse_func)(char *chunk, void * data);
41 
50 typedef struct memory_cell {
51  int type;
52  int occ;
53  void *ptr;
54  pthread_t id;
55  struct memory_cell *next;
56  struct memory_cell *prev;
58 
66 typedef struct _xpath_cond {
67  char rel;
68  char axes;
69  char op;
70  char op2;
71  char func;
72  char func2;
73  char *arg1;
74  char *arg2;
75  struct _xpath_node *xp;
76  struct _xpath_cond *next;
77 } xpath_cond_t;
78 
86 typedef struct _xpath_node {
87  char abs;
88  char rel;
89  char axes;
90  char *name;
91  struct _xpath_cond *xp_cond;
92  struct _xpath_cond *cond;
93  struct _xpath_node *next;
94 } xpath_node_t;
95 
103 typedef struct _xpath_tok_table {
104  unsigned char id;
105  unsigned char ids[256];
106  pthread_mutex_t mut;
107  struct _xpath_tok *next;
109 
117 typedef struct _xpath_tok {
118  unsigned char id;
119  struct _xpath_tok *next;
120 } xpath_tok_t;
121 
129 typedef struct _roxml_ns {
130  unsigned char id;
131  void * next;
132  char * alias;
133 } roxml_ns_t;
134 
143 typedef struct node {
144  unsigned short type;
145  union {
146  char *buf;
147  FILE *fil;
148  void *src;
149  } src;
150  unsigned long pos;
151  unsigned long end;
152  struct node *sibl;
153  struct node *chld;
154  struct node *prnt;
155  struct node *attr;
156  struct node *next;
157  struct node *ns;
158  void *priv;
159 } node_t;
160 
168 typedef struct _roxml_load_ctx {
169  int pos;
171  int state;
173  int mode;
176  int type;
177  int nsdef;
178  int ns;
179  void * src;
187  char * curr_name;
189  int doctype;
191 
198 typedef struct _roxml_xpath_ctx {
199  int pos;
203  int nbpath;
204  int bracket;
206  int quoted;
207  int dquoted;
208  int context;
214 
221 typedef struct _roxml_parser_item {
222  int count;
223  int def_count;
224  char chunk;
226  struct _roxml_parser_item *next;
228 
229 #endif /* ROXML_TYPES_H */
230