@@ -97,16 +97,16 @@ static inline void bound_str(str s, int mn, int mx)
9797 bound(end(s), mn, mx);
9898}
9999
100−void render_str(render* r, str s)
100+static void render_str(render* r, str s)
101101{
102102 bound_str(s, 0, doc_length(r->d));
103103 for (int i = 0; i < s.length; i++)
104104 render_char(r, r->d->body[s.start + i]);
105105}
106106
107−void render_tag(render* r, const node* n);
107+static void render_tag(render* r, const node* n);
108108
109−void render_content(render* r, const node* n)
109+static void render_content(render* r, const node* n)
110110{
111111 bound_str(n->inner, 0, doc_length(r->d));
112112 bound_str(n->nodes, 0, r->d->nodes.used_front);
@@ -123,7 +123,7 @@ void render_content(render* r, const node* n)
123123 render_str(r, start_end(done, end(n->inner)));
124124}
125125
126−void render_tag(render* r, const node* n)
126+static void render_tag(render* r, const node* n)
127127{
128128 render_char(r, '<');
129129 render_str(r, n->name);
@@ -145,7 +145,7 @@ void render_tag(render* r, const node* n)
145145 render_char(r, '>');
146146}
147147
148−int node_render(const document* d, const node* n, char* buffer, int length)
148+int hexml_node_render(const document* d, const node* n, char* buffer, int length)
149149{
150150 render r;
151151 r.d = d;
@@ -164,10 +164,10 @@ int node_render(const document* d, const node* n, char* buffer, int length)
164164/////////////////////////////////////////////////////////////////////
165165// NOT THE PARSER
166166
167−char* document_error(const document* d){return d->error_message;}
168−node* document_node(const document* d){return &d->nodes.nodes[0];}
167+char* hexml_document_error(const document* d){return d->error_message;}
168+node* hexml_document_node(const document* d){return &d->nodes.nodes[0];}
169169
170−void document_free(document* d)
170+void hexml_document_free(document* d)
171171{
172172 free(d->error_message);
173173 free(d->nodes.alloc);
@@ -175,20 +175,20 @@ void document_free(document* d)
175175 free(d);
176176}
177177
178−node* node_children(const document* d, const node* n, int* res)
178+node* hexml_node_children(const document* d, const node* n, int* res)
179179{
180180 *res = n->nodes.length;
181181 return &d->nodes.nodes[n->nodes.start];
182182}
183183
184−attr* node_attributes(const document* d, const node* n, int* res)
184+attr* hexml_node_attributes(const document* d, const node* n, int* res)
185185{
186186 *res = n->attrs.length;
187187 return &d->attrs.attrs[n->attrs.start];
188188}
189189
190190
191−attr* node_attributeBy(const document* d, const node* n, const char* s, int slen)
191+attr* hexml_node_attributeBy(const document* d, const node* n, const char* s, int slen)
192192{
193193 if (slen == -1) slen = (int) strlen(s);
194194 const int limit = end(n->attrs);
@@ -202,7 +202,7 @@ attr* node_attributeBy(const document* d, const node* n, const char* s, int slen
202202}
203203
204204// Search for given strings within a node
205−node* node_childBy(const document* d, const node* parent, const node* prev, const char* s, int slen)
205+node* hexml_node_childBy(const document* d, const node* parent, const node* prev, const char* s, int slen)
206206{
207207 if (slen == -1) slen = (int) strlen(s);
208208 int i = prev == NULL ? parent->nodes.start : (int) (prev + 1 - d->nodes.nodes);
@@ -220,13 +220,13 @@ node* node_childBy(const document* d, const node* parent, const node* prev, cons
220220/////////////////////////////////////////////////////////////////////
221221// PARSE TABLE
222222
223−const char tag_name1 = 0x1;
224−const char tag_name = 0x2;
225−const char tag_space = 0x4;
223+static const char tag_name1 = 0x1;
224+static const char tag_name = 0x2;
225+static const char tag_space = 0x4;
226226
227−char parse_table[256];
227+static char parse_table[256];
228228
229−void init_parse_table()
229+static void init_parse_table()
230230{
231231 static bool done = 0;
232232 if (done) return;
@@ -262,7 +262,7 @@ static inline void trim(document* d)
262262}
263263
264264// Find this character form the cursor onwards, if true adjust the cursor to that char, otherwise leave it at the end
265−bool find(document* d, char c)
265+static bool find(document* d, char c)
266266{
267267 char* x = memchr(d->cursor, c, d->end - d->cursor);
268268 if (x == NULL)
@@ -310,7 +310,7 @@ static inline void attr_alloc(attr_buffer* b, int ask)
310310 b->alloc = buf2;
311311}
312312
313−void set_error(document* d, const char* msg)
313+static void set_error(document* d, const char* msg)
314314{
315315 if (d->error_message != NULL) return; // keep the first error message
316316 d->error_message = malloc(strlen(msg)+1);
@@ -381,7 +381,7 @@ static inline str parse_attributes(document* d)
381381 return start_end(start, d->attrs.used);
382382}
383383
384−str parse_content(document* d);
384+static str parse_content(document* d);
385385
386386
387387// Add a new entry into tag, am at a '<'
@@ -451,7 +451,7 @@ static inline void parse_tag(document* d)
451451
452452// Parser until </, return the index of your node children
453453// Not inline as it is recursive
454−str parse_content(document* d)
454+static str parse_content(document* d)
455455{
456456 int before = d->nodes.used_back;
457457 while (d->error_message == NULL)
@@ -512,7 +512,7 @@ typedef struct
512512 node nodes[500];
513513} buffer;
514514
515−document* document_parse(const char* s, int slen)
515+document* hexml_document_parse(const char* s, int slen)
516516{
517517 if (slen == -1) slen = (int) strlen(s);
518518 assert(s[slen] == 0);