refactoring: only function prototypes belong in header files
[smdp.git] / markdown.c
1 #include <stdio.h>
2 #include <stdlib.h>
3
4 #include "include/cstring.h"
5 #include "include/markdown.h"
6
7 line_t *new_line() {
8     line_t *x = malloc(sizeof(line_t));
9     return x;
10 }
11
12 line_t *next_line(line_t *prev) {
13     line_t *x = new_line();
14     x->prev = prev;
15     prev->next = x;
16     return x;
17 }
18
19 page_t *new_page() {
20     page_t *x = malloc(sizeof(page_t));
21     return x;
22 }
23
24 page_t *next_page(page_t *prev) {
25     page_t *x = new_page();
26     x->prev = prev;
27     prev->next = x;
28     return x;
29 }
30
31 document_t *new_document() {
32     document_t *x = malloc(sizeof(document_t));
33     return x;
34 }
35