From e53b7416d6a40a7d2e1a079643e622849975ff5d Mon Sep 17 00:00:00 2001 From: Miciah Dashiel Butler Masters Date: Wed, 16 Aug 2006 20:19:58 +0000 Subject: [PATCH] Fix -dump with charsets other than UTF-8 Restring the spaghetti in dump_to_file to fix a bug that was introduced in commit 2a6125e3d0407b588eb286d4d0ff5c98c23ebda9 whereby when document.dump.codepage != "utf-8", the document itself was not output, only the references list. --- src/viewer/dump/dump.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/viewer/dump/dump.c b/src/viewer/dump/dump.c index 86b65682f..aa9159d75 100644 --- a/src/viewer/dump/dump.c +++ b/src/viewer/dump/dump.c @@ -799,6 +799,7 @@ utf_8: if (write_char('\n', fd, buf, &bptr)) goto fail; } +ref: #endif /* CONFIG_UTF_8 */ if (hard_write(fd, buf, bptr) != bptr) { @@ -806,9 +807,7 @@ fail: mem_free(buf); return -1; } -#ifdef CONFIG_UTF_8 -ref: -#endif /* CONFIG_UTF_8 */ + if (document->nlinks && get_opt_bool("document.dump.references")) { int x; unsigned char *header = "\nReferences\n\n Visible links\n";