1
0
mirror of https://github.com/rkd77/elinks.git synced 2025-05-18 00:48:57 -04:00
elinks/src/document/docdata.c
Petr Baudis 0f6d4310ad Initial commit of the HEAD branch of the ELinks CVS repository, as of
Thu Sep 15 15:57:07 CEST 2005. The previous history can be added to this
by grafting.
2005-09-15 15:58:31 +02:00

32 lines
555 B
C

/* The document->data tools */
/* $Id: docdata.c,v 1.1 2003/11/18 22:18:12 pasky Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <stdlib.h>
#include "elinks.h"
#include "document/docdata.h"
#include "document/document.h"
#include "util/error.h"
struct line *
realloc_lines(struct document *document, int y)
{
assert(document);
if_assert_failed return NULL;
if (document->height <= y) {
if (!ALIGN_LINES(&document->data, document->height, y + 1))
return NULL;
document->height = y + 1;
}
return &document->data[y];
}