mirror of
https://github.com/rkd77/elinks.git
synced 2025-06-30 22:19:29 -04: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;
|
unsigned char *end;
|
||||||
struct string title;
|
struct string title;
|
||||||
struct string head;
|
struct string head;
|
||||||
int i;
|
|
||||||
|
|
||||||
assert(cached && document);
|
assert(cached && document);
|
||||||
if_assert_failed return;
|
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
|
/* Drop empty allocated lines at end of document if any
|
||||||
* and adjust document height. */
|
* and adjust document height. */
|
||||||
for (i = document->height - 1; i >= 0 ; i--) {
|
while (document->height && !document->data[document->height - 1].length)
|
||||||
if (!document->data[i].length) {
|
mem_free_if(document->data[--document->height].chars);
|
||||||
mem_free_if(document->data[i].chars);
|
|
||||||
document->height--;
|
|
||||||
} else break;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Calculate document width. */
|
/* Calculate document width. */
|
||||||
document->width = 0;
|
{
|
||||||
for (i = 0; i < document->height; i++)
|
int i;
|
||||||
int_lower_bound(&document->width, document->data[i].length);
|
|
||||||
|
document->width = 0;
|
||||||
|
for (i = 0; i < document->height; i++)
|
||||||
|
int_lower_bound(&document->width, document->data[i].length);
|
||||||
|
}
|
||||||
|
|
||||||
#if 1
|
#if 1
|
||||||
document->options.needs_width = 1;
|
document->options.needs_width = 1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user