X-Git-Url: https://git.danieliu.xyz/?a=blobdiff_plain;f=include%2Fmarkdown.h;h=3a85947b6695eb12661eeb16912f700f0aede2f9;hb=3e6d7001c4058b93281645e72ad1e223280b8589;hp=655d8f34d0670d905c3e96962538bccf3659d0ad;hpb=b416f18295f7edcb5474396a6b26a59fd5ddb1f5;p=smdp.git diff --git a/include/markdown.h b/include/markdown.h index 655d8f3..3a85947 100644 --- a/include/markdown.h +++ b/include/markdown.h @@ -2,7 +2,24 @@ #define MARKDOWN_H /* - * A implementation of markdown objects. + * An implementation of markdown objects. + * Copyright (C) 2015 Michael Goehler + * + * 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 + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * * * enum: line_bitmask which enumerates markdown formating bits * @@ -15,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 * */ @@ -23,10 +42,19 @@ enum line_bitmask { IS_H1, + IS_H1_ATX, IS_H2, + IS_H2_ATX, IS_QUOTE, IS_CODE, + IS_TILDE_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 }; @@ -44,6 +72,7 @@ typedef struct _slide_t { struct _slide_t *prev; struct _slide_t *next; int lines; + int stop; } slide_t; typedef struct _deck_t { @@ -58,5 +87,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 )