diff options
Diffstat (limited to 'sfeed_opml_import.c')
-rw-r--r-- | sfeed_opml_import.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sfeed_opml_import.c b/sfeed_opml_import.c index 0844b5c..ce33aac 100644 --- a/sfeed_opml_import.c +++ b/sfeed_opml_import.c @@ -1,4 +1,3 @@ -#include <ctype.h> #include <stdio.h> #include <strings.h> @@ -12,7 +11,7 @@ static void printsafe(const char *s) { for (; *s; s++) { - if (iscntrl((unsigned char)*s)) + if (ISCNTRL((unsigned char)*s)) continue; else if (*s == '\\') fputs("\\\\", stdout); @@ -71,7 +70,7 @@ static void xmlattrentity(XMLParser *p, const char *t, size_t tl, const char *n, size_t nl, const char *v, size_t vl) { - char buf[16]; + char buf[8]; int len; if ((len = xml_entitytostr(v, buf, sizeof(buf))) > 0) @@ -97,9 +96,12 @@ main(void) "# list of feeds to fetch:\n" "feeds() {\n" " # feed <name> <feedurl> [basesiteurl] [encoding]\n", stdout); - /* NOTE: getnext is defined in xml.h for inline optimization */ + /* NOTE: GETNEXT is defined in xml.h for inline optimization */ xml_parse(&parser); fputs("}\n", stdout); + checkfileerror(stdin, "<stdin>", 'r'); + checkfileerror(stdout, "<stdout>", 'w'); + return 0; } |