From 37afcf334fa1ba0b668bde08e8fcaaa9fd7dfa0d Mon Sep 17 00:00:00 2001 From: Hiltjo Posthuma Date: Fri, 9 Oct 2020 11:43:52 +0200 Subject: xml: remove unused code for sfeed --- xml.c | 11 +---------- xml.h | 4 ---- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/xml.c b/xml.c index 67ad5a8..9c15e11 100644 --- a/xml.c +++ b/xml.c @@ -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; } } diff --git a/xml.h b/xml.h index bf60cbf..7b6bd35 100644 --- a/xml.h +++ b/xml.h @@ -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 *, -- cgit v1.2.3