summaryrefslogtreecommitdiff
path: root/sfeed_opml_import.c
diff options
context:
space:
mode:
authorBenjamin Chausse <benjamin@chausse.xyz>2024-08-09 14:11:50 -0400
committerBenjamin Chausse <benjamin@chausse.xyz>2024-08-09 14:11:50 -0400
commit5857d82e8e596d6fda406a0c4d8d68ca7a03c124 (patch)
tree553916894dee907825360580c5d9a05c82c5af16 /sfeed_opml_import.c
parent3574e3cbf9d99546e868aeb995ce2c171cdc36a6 (diff)
parent19957bc272e745af7b56b79fa648e8b6b77113b1 (diff)
Merge remote-tracking branch 'upstream/master'HEADmaster
Diffstat (limited to 'sfeed_opml_import.c')
-rw-r--r--sfeed_opml_import.c10
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;
}