@@ -292,14 +292,14 @@ bool find(document* d, char c)
292/////////////////////////////////////////////////////////////////////
292/////////////////////////////////////////////////////////////////////
293// PARSING CODE
293// PARSING CODE
295−void node_alloc(node_buffer* b, int ask)
295+void static inline node_alloc(node_buffer* b, int ask)
297 int space = b->size - b->used_back - b->used_front;
297 int space = b->size - b->used_back - b->used_front;
298 if (space >= ask) return;
298 if (space >= ask) return;
299 assert(0);
299 assert(0);
302−void attr_alloc(attr_buffer* b, int ask)
302+void static inline attr_alloc(attr_buffer* b, int ask)
304 int space = b->size - b->used;
304 int space = b->size - b->used;
305 if (space >= ask) return;
305 if (space >= ask) return;
@@ -312,7 +312,7 @@ void attr_alloc(attr_buffer* b, int ask)
313// you now expect a name, perhaps preceeded by whitespace
313// you now expect a name, perhaps preceeded by whitespace
314// the name may be empty
314// the name may be empty
315−str parse_name(document* d)
315+str static inline parse_name(document* d)
318 int start = doc_position(d);
318 int start = doc_position(d);
@@ -324,7 +324,7 @@ str parse_name(document* d)
324 return start_end(start, doc_position(d));
324 return start_end(start, doc_position(d));
327−str parse_attrval(document* d)
327+str static inline parse_attrval(document* d)
330 if (peek(d) != '=') return start_length(0,0);
330 if (peek(d) != '=') return start_length(0,0);
@@ -351,7 +351,7 @@ str parse_attrval(document* d)
352// seen a tag name, now looking for attributes terminated by >
352// seen a tag name, now looking for attributes terminated by >
353// puts the attributes it finds in the attribute buffer
353// puts the attributes it finds in the attribute buffer
354−str parse_attributes(document* d)
354+str static inline parse_attributes(document* d)
357 res.start = d->attrs.used;
357 res.start = d->attrs.used;
@@ -372,7 +372,7 @@ str parse_content(document* d);
374// Add a new entry into tag, am at a '<'
374// Add a new entry into tag, am at a '<'
375−void parse_tag(document* d)
375+void static inline parse_tag(document* d)
377 node_alloc(&d->nodes, 1);
377 node_alloc(&d->nodes, 1);
378 d->nodes.used_back++;
378 d->nodes.used_back++;
@@ -426,6 +426,7 @@ void parse_tag(document* d)
428// Parser until </, return the index of your node children
428// Parser until </, return the index of your node children
429+// Not inline as it is recursive
429str parse_content(document* d)
430str parse_content(document* d)
431 int before = d->nodes.used_back;
432 int before = d->nodes.used_back;