sfeed

simple feed reader - forked from git.codemadness.org/sfeed
git clone git://src.gearsix.net/sfeed
Log | Files | Refs | Atom | README | LICENSE

commit 37afcf334fa1ba0b668bde08e8fcaaa9fd7dfa0d
parent 3a5295f595acee81170565ba0405a64d7110a229
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Fri,  9 Oct 2020 11:43:52 +0200

xml: remove unused code for sfeed

Diffstat:
Mxml.c | 11+----------
Mxml.h | 4----
2 files changed, 1 insertion(+), 14 deletions(-)

diff --git 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 @@ -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 *,