mirror of
https://github.com/rkd77/elinks.git
synced 2025-02-02 15:09:23 -05:00
Merge with git+ssh://pasky.or.cz/srv/git/elinks.git
This commit is contained in:
commit
966d965c11
@ -1887,7 +1887,6 @@ render_html_document(struct cache_entry *cached, struct document *document,
|
||||
unsigned char *end;
|
||||
struct string title;
|
||||
struct string head;
|
||||
int i;
|
||||
|
||||
assert(cached && document);
|
||||
if_assert_failed return;
|
||||
@ -1929,17 +1928,17 @@ render_html_document(struct cache_entry *cached, struct document *document,
|
||||
|
||||
/* Drop empty allocated lines at end of document if any
|
||||
* and adjust document height. */
|
||||
for (i = document->height - 1; i >= 0 ; i--) {
|
||||
if (!document->data[i].length) {
|
||||
mem_free_if(document->data[i].chars);
|
||||
document->height--;
|
||||
} else break;
|
||||
}
|
||||
while (document->height && !document->data[document->height - 1].length)
|
||||
mem_free_if(document->data[--document->height].chars);
|
||||
|
||||
/* Calculate document width. */
|
||||
document->width = 0;
|
||||
for (i = 0; i < document->height; i++)
|
||||
int_lower_bound(&document->width, document->data[i].length);
|
||||
{
|
||||
int i;
|
||||
|
||||
document->width = 0;
|
||||
for (i = 0; i < document->height; i++)
|
||||
int_lower_bound(&document->width, document->data[i].length);
|
||||
}
|
||||
|
||||
#if 1
|
||||
document->options.needs_width = 1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user