diff options
-rw-r--r-- | README.xml | 14 |
1 files changed, 9 insertions, 5 deletions
@@ -68,7 +68,8 @@ static unsigned int isbase = 0, islink = 0, isfeedlink = 0, found = 0; static char feedlink[4096] = "", basehref[4096] = "", feedtype[256] = ""; static void -xmltagstart(XMLParser *p, const char *tag, size_t taglen) { +xmltagstart(XMLParser *p, const char *tag, size_t taglen) +{ isbase = islink = isfeedlink = 0; if(taglen == 4) { /* optimization */ if(!strncasecmp(tag, "base", taglen)) @@ -79,7 +80,8 @@ xmltagstart(XMLParser *p, const char *tag, size_t taglen) { } static void -xmltagstartparsed(XMLParser *p, const char *tag, size_t taglen, int isshort) { +xmltagstartparsed(XMLParser *p, const char *tag, size_t taglen, int isshort) +{ if(isfeedlink) { if(*feedtype) { fputs(feedtype, stdout); @@ -93,7 +95,8 @@ xmltagstartparsed(XMLParser *p, const char *tag, size_t taglen, int isshort) { static void xmlattr(XMLParser *p, const char *tag, size_t taglen, const char *name, - size_t namelen, const char *value, size_t valuelen) { + size_t namelen, const char *value, size_t valuelen) +{ if(namelen != 4) /* optimization */ return; @@ -113,7 +116,8 @@ xmlattr(XMLParser *p, const char *tag, size_t taglen, const char *name, } int -main(int argc, char **argv) { +main(int argc, char **argv) +{ XMLParser x; /* base href */ @@ -127,6 +131,6 @@ main(int argc, char **argv) { xmlparser_parse(&x); - return found > 0 ? EXIT_SUCCESS : EXIT_FAILURE; + return found > 0 ? 0 : 1; } |