commit bcd1e1972d63cdd2ca8b42572a129be521558aba
parent c61c37abf3b6236cd65690fe8a47bdcd9d66bc13
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Fri,  2 Jan 2015 15:30:11 +0100

README.xml: code-style

Diffstat:
MREADME.xml | 14+++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/README.xml b/README.xml @@ -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; }