small readme changes
[smdp.git] / include / parser.h
1 #if !defined( PARSER_H )
2 #define PARSER_H
3
4 /*
5  * Functions necessary to parse a file and transform its content into
6  * a deck of slides containing lines. All based on markdown formating
7  * rules.
8  * Copyright (C) 2014 Michael Goehler
9  *
10  * This file is part of mdp.
11  *
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.
16  *
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.
21  *
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/>.
24  *
25  *
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
29  *           rules in given line
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
33  *           char
34  * function: next_nonblank, next_blank, next_word to calculate string offset's
35  *
36  */
37
38 #include "markdown.h"
39
40 #define EXPAND_TABS 4
41 #define CODE_INDENT 4
42
43 deck_t *markdown_load(FILE *input);
44 int markdown_analyse(cstring_t *text);
45 void markdown_debug(deck_t *deck, int debug);
46 int is_utf8(char ch);
47 int length_utf8(char ch);
48 int next_nonblank(cstring_t *text, int i);
49 int next_blank(cstring_t *text, int i);
50 int next_word(cstring_t *text, int i);
51
52 #endif // !defined( PARSER_H )