summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiltjo Posthuma <hiltjo@codemadness.org>2020-10-09 11:43:52 +0200
committerHiltjo Posthuma <hiltjo@codemadness.org>2020-10-09 11:44:30 +0200
commit37afcf334fa1ba0b668bde08e8fcaaa9fd7dfa0d (patch)
tree8f69dfda22ed2e27411e83cb31eaec6ee18773d2
parent3a5295f595acee81170565ba0405a64d7110a229 (diff)
xml: remove unused code for sfeed
-rw-r--r--xml.c11
-rw-r--r--xml.h4
2 files changed, 1 insertions, 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 *,