summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source/fitz/xml.c3
-rw-r--r--source/html/html-layout.c5
2 files changed, 6 insertions, 2 deletions
diff --git a/source/fitz/xml.c b/source/fitz/xml.c
index cac3692e..b7c89cf4 100644
--- a/source/fitz/xml.c
+++ b/source/fitz/xml.c
@@ -2,6 +2,7 @@
#include <string.h>
#include <stdlib.h>
+#include <stdio.h>
static const struct { const char *ent; int ucs; } html_entities[] = {
{"nbsp",160}, {"iexcl",161}, {"cent",162}, {"pound",163},
@@ -95,7 +96,6 @@ struct fz_xml_s
fz_xml *up, *down, *tail, *prev, *next;
};
-#if 0
static void xml_indent(int n)
{
while (n--) {
@@ -152,7 +152,6 @@ void fz_debug_xml(fz_xml *item, int level)
printf(")%s\n", item->name);
}
}
-#endif
fz_xml *fz_xml_prev(fz_xml *item)
{
diff --git a/source/html/html-layout.c b/source/html/html-layout.c
index d6f63975..802b8288 100644
--- a/source/html/html-layout.c
+++ b/source/html/html-layout.c
@@ -2700,6 +2700,11 @@ fz_parse_html(fz_context *ctx, fz_html_font_set *set, fz_archive *zip, const cha
fz_rethrow(ctx);
}
+#ifndef NDEBUG
+ if (fz_atoi(getenv("FZ_DEBUG_XML")))
+ fz_debug_xml(root, 0);
+#endif
+
fz_try(ctx)
{
if (fz_xml_find(root, "FictionBook"))