X-Git-Url: https://git.danieliu.xyz/?a=blobdiff_plain;f=include%2Fmarkdown.h;h=7a435a8cfbf32dd9ab2f35b5927fd1e4af08936a;hb=354cf2e07ccd0d7900f96bffc279093997cbe203;hp=1213ac761e78e678b62346598b58636ccb545b89;hpb=3da34e1957b3484506b5f0f79f84f64a4cff2f1b;p=smdp.git diff --git a/include/markdown.h b/include/markdown.h index 1213ac7..7a435a8 100644 --- a/include/markdown.h +++ b/include/markdown.h @@ -3,9 +3,9 @@ /* * An implementation of markdown objects. - * Copyright (C) 2014 Michael Goehler + * Copyright (C) 2018 Michael Goehler * - * This file is part of mpd. + * This file is part of mdp. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -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,10 +42,20 @@ enum line_bitmask { IS_H1, + IS_H1_ATX, IS_H2, + IS_H2_ATX, IS_QUOTE, IS_CODE, + IS_TILDE_CODE, + IS_GFM_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 }; @@ -61,6 +73,7 @@ typedef struct _slide_t { struct _slide_t *prev; struct _slide_t *next; int lines; + int stop; } slide_t; typedef struct _deck_t { @@ -75,5 +88,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 )