1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-09-30 03:26:23 -04:00

Fix -dump with charsets other than UTF-8

Restring the spaghetti in dump_to_file to fix a bug that was introduced
in commit 2a6125e3d0 whereby when
document.dump.codepage != "utf-8", the document itself was not output,
only the references list.
This commit is contained in:
Miciah Dashiel Butler Masters 2006-08-16 20:19:58 +00:00 committed by Miciah Dashiel Butler Masters
parent c8c8325092
commit e53b7416d6

View File

@ -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";