1 #if !defined( PARSER_H )
5 * Functions necessary to parse a file and transform its content into
6 * a deck of slides containing lines. All based on markdown formating
8 * Copyright (C) 2014 Michael Goehler
10 * This file is part of mdp.
12 * This program is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation, either version 3 of the License, or
15 * (at your option) any later version.
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
22 * You should have received a copy of the GNU General Public License
23 * along with this program. If not, see <http://www.gnu.org/licenses/>.
26 * function: markdown_load is the main function which reads a file handle,
27 * and initializes deck, slides and lines
28 * function: markdown_analyse which is used to identify line wide formating
30 * function: markdown_debug to print a report of the generated data structure
31 * function: is_utf8 detects multi-byte char
32 * function: length_utf8 calculates the amount of bytes used for a multi-byte
34 * function: next_nonblank, next_blank, next_word to calculate string offset's
43 #define UNORDERED_LIST_MAX_LEVEL 3
45 deck_t *markdown_load(FILE *input);
46 int markdown_analyse(cstring_t *text);
47 void markdown_debug(deck_t *deck, int debug);
49 int length_utf8(char ch);
50 int next_nonblank(cstring_t *text, int i);
51 int prev_blank(cstring_t *text, int i);
52 int next_blank(cstring_t *text, int i);
53 int next_word(cstring_t *text, int i);
55 #endif // !defined( PARSER_H )