summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvan Jegen <s.jegen@gmail.com>2016-09-05 19:08:24 +0200
committerSilvan Jegen <s.jegen@gmail.com>2016-09-05 19:08:24 +0200
commit7c0c31583aca85b95e58714b7996503e23b9e836 (patch)
treed466ca06e922589a271d2b3487d8ff9244f0dd04
parent6fef5e077a3a5687b335be1260bc030661326c07 (diff)
Print errors to stderr
-rw-r--r--ezxml.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ezxml.c b/ezxml.c
index f4e9d18..588addd 100644
--- a/ezxml.c
+++ b/ezxml.c
@@ -6,7 +6,7 @@
int process(char *fn) {
ezxml_t ezdoc = ezxml_parse_file(fn);
if (!ezdoc) {
- printf("Error when parsing file.\n");
+ fprintf(stderr, "Error when parsing file.\n");
}
ezxml_t title = ezxml_get(ezdoc, "front", 0, "article-meta", 0, "title-group", 0, "article-title", -1);
@@ -16,7 +16,7 @@ int process(char *fn) {
ezxml_t body = ezxml_get(ezdoc, "body", -1);
if (!body) {
- fprintf(stderr, "body not found\n");
+ fprintf(stderr, "Body not found\n");
}
for (ezxml_t c = ezxml_child(body, "sec"); c; c = c->next) {
ezxml_t t = ezxml_get(c, "title", -1);