flush after writing the URL inline - webdump - HTML to plain-text converter for webpages
HTML git clone git://git.codemadness.org/webdump
DIR Log
DIR Files
DIR Refs
DIR README
DIR LICENSE
---
DIR commit 7d4723febabeb679e1980c12b5dfd3b656475b4f
DIR parent 6365a78f6c050106e64b281d29d8ef550f131bf1
HTML Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Fri, 8 Sep 2023 11:29:59 +0200
flush after writing the URL inline
Otherwise the URL could be partially wrapped and incorrectly wrap to a new
line.
Remove a TODO, the flush is really needed there.
Diffstat:
M webdump.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
DIR diff --git a/webdump.c b/webdump.c
@@ -1294,7 +1294,7 @@ handleinlinealt(void)
for (s = start; s < e; s++)
printc((unsigned char)*s);
- hflush(); /* TODO: this flush should not be needed */
+ hflush();
}
}
@@ -1584,6 +1584,7 @@ endnode(struct node *cur)
hprintf(" [%s: %s]",
!tagcmp(cur->tag.name, "a") ? "link" : cur->tag.name,
nodes_links[curnode].data);
+ hflush();
}
handleendtag(&(cur->tag));