1 #ifndef EL__DOCUMENT_DOCDATA_H
2 #define EL__DOCUMENT_DOCDATA_H
3 
4 #include "document/document.h"
5 #include "util/memory.h"
6 
7 #define LINES_GRANULARITY	0x7F
8 #define LINE_GRANULARITY	0x0F
9 #define LINK_GRANULARITY	0x7F
10 
11 #define ALIGN_LINES(x, o, n) mem_align_alloc(x, o, n, struct line, LINES_GRANULARITY)
12 #define ALIGN_LINE(x, o, n) mem_align_alloc(x, o, n, struct screen_char, LINE_GRANULARITY)
13 #define ALIGN_LINK(x, o, n) mem_align_alloc(x, o, n, struct link, LINK_GRANULARITY)
14 
15 #define realloc_points(link, size) \
16 	mem_align_alloc(&(link)->points, (link)->npoints, size, struct point, 0)
17 
18 struct line *realloc_lines(struct document *document, int y);
19 
20 #endif
21