summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sfeed.c4
-rw-r--r--sfeed_opml_import.c4
-rw-r--r--sfeed_web.c12
-rw-r--r--sfeed_xmlenc.c12
4 files changed, 16 insertions, 16 deletions
diff --git a/sfeed.c b/sfeed.c
index 07392e7..344b7f8 100644
--- a/sfeed.c
+++ b/sfeed.c
@@ -778,14 +778,14 @@ main(int argc, char *argv[])
ctx.item.contenttype = ContentTypePlain;
ctx.item.feedtype = FeedTypeNone;
- xmlparser_init(&parser, stdin);
+ memset(&parser, 0, sizeof(parser));
parser.xmltagstart = xml_handler_start_element;
parser.xmltagend = xml_handler_end_element;
parser.xmldata = xml_handler_data;
parser.xmldataentity = xml_handler_data_entity;
parser.xmlattr = xml_handler_attr;
parser.xmlcdata = xml_handler_cdata;
- xmlparser_parse(&parser);
+ xmlparser_parse_fd(&parser, 0);
return 0;
}
diff --git a/sfeed_opml_import.c b/sfeed_opml_import.c
index adf5c45..e79a2ef 100644
--- a/sfeed_opml_import.c
+++ b/sfeed_opml_import.c
@@ -73,7 +73,7 @@ xml_handler_attr(XMLParser *p, const char *tag, size_t taglen,
int
main(void)
{
- xmlparser_init(&parser, stdin);
+ memset(&parser, 0, sizeof(parser));
parser.xmltagstart = xml_handler_start_element;
parser.xmltagend = xml_handler_end_element;
parser.xmlattr = xml_handler_attr;
@@ -88,7 +88,7 @@ main(void)
"# list of feeds to fetch:\n"
"feeds() {\n"
" # feed <name> <feedurl> <basesiteurl> [encoding]\n", stdout);
- xmlparser_parse(&parser);
+ xmlparser_parse_fd(&parser, 0);
fputs("}\n", stdout);
return 0;
diff --git a/sfeed_web.c b/sfeed_web.c
index 77f22cb..2824ab6 100644
--- a/sfeed_web.c
+++ b/sfeed_web.c
@@ -73,18 +73,18 @@ xmlattr(XMLParser *p, const char *tag, size_t taglen, const char *name,
int
main(int argc, char *argv[])
{
- XMLParser x;
+ XMLParser parser;
/* base href */
if(argc > 1)
strlcpy(basehref, argv[1], sizeof(basehref));
- xmlparser_init(&x, stdin);
- x.xmltagstart = xmltagstart;
- x.xmlattr = xmlattr;
- x.xmltagstartparsed = xmltagstartparsed;
+ memset(&parser, 0, sizeof(parser));
+ parser.xmltagstart = xmltagstart;
+ parser.xmlattr = xmlattr;
+ parser.xmltagstartparsed = xmltagstartparsed;
- xmlparser_parse(&x);
+ xmlparser_parse_fd(&parser, 0);
return found > 0 ? 0: 1;
}
diff --git a/sfeed_xmlenc.c b/sfeed_xmlenc.c
index 1dbfb5b..7bd54a6 100644
--- a/sfeed_xmlenc.c
+++ b/sfeed_xmlenc.c
@@ -54,14 +54,14 @@ xmlattr(XMLParser *p, const char *tag, size_t taglen, const char *name,
int
main(void)
{
- XMLParser x;
+ XMLParser parser;
- xmlparser_init(&x, stdin);
- x.xmltagstart = xmltagstart;
- x.xmltagend = xmltagend;
- x.xmlattr = xmlattr;
+ memset(&parser, 0, sizeof(parser));
+ parser.xmltagstart = xmltagstart;
+ parser.xmltagend = xmltagend;
+ parser.xmlattr = xmlattr;
- xmlparser_parse(&x);
+ xmlparser_parse_fd(&parser, 0);
return 1;
}