diff options
Diffstat (limited to 'sfeed_xmlenc.c')
-rw-r--r-- | sfeed_xmlenc.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/sfeed_xmlenc.c b/sfeed_xmlenc.c index c6a43d4..461c047 100644 --- a/sfeed_xmlenc.c +++ b/sfeed_xmlenc.c @@ -1,4 +1,3 @@ -#include <ctype.h> #include <stdio.h> #include <stdlib.h> #include <strings.h> @@ -26,10 +25,10 @@ xmlattr(XMLParser *p, const char *t, size_t tl, const char *n, size_t nl, return; for (; *v; v++) { - if (isalpha((unsigned char)*v) || - isdigit((unsigned char)*v) || + if (ISALPHA((unsigned char)*v) || + ISDIGIT((unsigned char)*v) || *v == '.' || *v == ':' || *v == '-' || *v == '_') - putchar(tolower((unsigned char)*v)); + putchar(TOLOWER((unsigned char)*v)); } } @@ -53,8 +52,11 @@ main(void) parser.xmlattrend = xmlattrend; parser.xmltagstart = xmltagstart; - /* NOTE: getnext is defined in xml.h for inline optimization */ + /* NOTE: GETNEXT is defined in xml.h for inline optimization */ xml_parse(&parser); + checkfileerror(stdin, "<stdin>", 'r'); + checkfileerror(stdout, "<stdout>", 'w'); + return 0; } |