diff options
author | Hiltjo Posthuma <hiltjo@codemadness.org> | 2015-01-02 15:30:11 +0100 |
---|---|---|
committer | Hiltjo Posthuma <hiltjo@codemadness.org> | 2015-01-02 15:30:11 +0100 |
commit | bcd1e1972d63cdd2ca8b42572a129be521558aba (patch) | |
tree | bc41d456cd0b25dfcf61be2bda39842cb89b1ca6 | |
parent | c61c37abf3b6236cd65690fe8a47bdcd9d66bc13 (diff) |
README.xml: code-style
-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; } |