diff options
-rw-r--r-- | xml.c | 11 | ||||
-rw-r--r-- | xml.h | 4 |
2 files changed, 1 insertions, 14 deletions
@@ -116,8 +116,7 @@ startvalue: static void xml_parsecomment(XMLParser *x) { - size_t i = 0; - int c; + int c, i; while ((c = GETNEXT()) != EOF) { if (c == '-') { @@ -138,8 +137,6 @@ xml_parsecdata(XMLParser *x) size_t datalen = 0, i = 0; int c; - if (x->xmlcdatastart) - x->xmlcdatastart(x); while ((c = GETNEXT()) != EOF) { if (c == ']' || c == '>') { if (x->xmlcdata && datalen) { @@ -158,8 +155,6 @@ xml_parsecdata(XMLParser *x) } continue; } else if (c == '>' && i == 2) { - if (x->xmlcdataend) - x->xmlcdataend(x); return; } else if (i) { if (x->xmlcdata) @@ -363,8 +358,6 @@ xml_parse(XMLParser *x) } else { /* parse tag data */ datalen = 0; - if (x->xmldatastart) - x->xmldatastart(x); while ((c = GETNEXT()) != EOF) { if (c == '&') { if (datalen) { @@ -411,8 +404,6 @@ xml_parse(XMLParser *x) x->data[datalen] = '\0'; if (x->xmldata && datalen) x->xmldata(x, x->data, datalen); - if (x->xmldataend) - x->xmldataend(x); break; } } @@ -13,13 +13,9 @@ typedef struct xmlparser { const char *, size_t); void (*xmlattrentity)(struct xmlparser *, const char *, size_t, const char *, size_t, const char *, size_t); - void (*xmlcdatastart)(struct xmlparser *); void (*xmlcdata)(struct xmlparser *, const char *, size_t); - void (*xmlcdataend)(struct xmlparser *); void (*xmldata)(struct xmlparser *, const char *, size_t); - void (*xmldataend)(struct xmlparser *); void (*xmldataentity)(struct xmlparser *, const char *, size_t); - void (*xmldatastart)(struct xmlparser *); void (*xmltagend)(struct xmlparser *, const char *, size_t, int); void (*xmltagstart)(struct xmlparser *, const char *, size_t); void (*xmltagstartparsed)(struct xmlparser *, const char *, |