pinosaur
/
smdp.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
initialize all variables correctly + make it finally work
[smdp.git]
/
markdown.c
diff --git
a/markdown.c
b/markdown.c
index
3cbdf0d
..
e578fa9
100644
(file)
--- a/
markdown.c
+++ b/
markdown.c
@@
-6,6
+6,9
@@
line_t *new_line() {
line_t *x = malloc(sizeof(line_t));
line_t *new_line() {
line_t *x = malloc(sizeof(line_t));
+ x->text = (void*)0;
+ x->prev = x->next = (void*)0;
+ x->bits = x->offset = 0;
return x;
}
return x;
}
@@
-18,6
+21,8
@@
line_t *next_line(line_t *prev) {
page_t *new_page() {
page_t *x = malloc(sizeof(page_t));
page_t *new_page() {
page_t *x = malloc(sizeof(page_t));
+ x->line = (void*)0;
+ x->prev = x->next = (void*)0;
return x;
}
return x;
}
@@
-30,6
+35,8
@@
page_t *next_page(page_t *prev) {
document_t *new_document() {
document_t *x = malloc(sizeof(document_t));
document_t *new_document() {
document_t *x = malloc(sizeof(document_t));
+ x->title = x->author = x->date = (void*)0;
+ x->page = (void*)0;
return x;
}
return x;
}