@@ -63,10 +63,11 @@ struct document
6363
6464typedef struct
6565{
66− const document* d;
67− char* buffer;
68− int length;
69− int cursor;
66+ const document* d; // Document, used to get at the body
67+ char* buffer; // Buffer we are writing too
68+ int length; // Length of buffer, do not write past the end.
69+ // No character is reserved for a NULL terminator.
70+ int cursor; // Cursor of where we are writing now
7071} render;
7172
7273static inline void render_char(render* r, char c)
@@ -178,7 +179,6 @@ attr* hexml_node_attributes(const document* d, const node* n, int* res)
178179 return &d->attrs.attrs[n->attrs.start];
179180}
180181
181−
182182attr* hexml_node_attribute(const document* d, const node* n, const char* s, int slen)
183183{
184184 if (slen == -1) slen = (int) strlen(s);