X-Git-Url: https://git.danieliu.xyz/?a=blobdiff_plain;f=include%2Fmarkdown.h;h=da8805e8b5caaeaae7fb67c1c835a75f7252ecf1;hb=680d0478fc66d6d25b1f258be0114d6c915ec0a0;hp=46a1f38f274aa4fde621f83e80ab4bdcafb34007;hpb=4499a0ea0cecd41b7053ce5768a85efdfc48848a;p=smdp.git diff --git a/include/markdown.h b/include/markdown.h index 46a1f38..da8805e 100644 --- a/include/markdown.h +++ b/include/markdown.h @@ -32,6 +32,8 @@ * function: next_slide to extend a linked list of type slide by one element * function: new_line to initialize a new linked list of type line * function: next_line to extend a linked list of type line by one element + * function: free_line to free a line elements memory + * function: free_deck to free a deck's memory * */ @@ -40,14 +42,18 @@ enum line_bitmask { IS_H1, + IS_H1_ATX, IS_H2, + IS_H2_ATX, IS_QUOTE, IS_CODE, IS_HR, IS_UNORDERED_LIST_1, IS_UNORDERED_LIST_2, IS_UNORDERED_LIST_3, + IS_UNORDERED_LIST_EXT, IS_CENTER, + IS_STOP, IS_EMPTY }; @@ -65,6 +71,7 @@ typedef struct _slide_t { struct _slide_t *prev; struct _slide_t *next; int lines; + int stop; } slide_t; typedef struct _deck_t { @@ -79,5 +86,7 @@ line_t *next_line(line_t *prev); slide_t *new_slide(); slide_t *next_slide(slide_t *prev); deck_t *new_deck(); +void free_line(line_t *l); +void free_deck(deck_t *); #endif // !defined( MARKDOWN_H )