removed duplicate function + added some comments to header files
[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  *
9  * function: markdown_load is the main function which reads a file handle,
10  *           and initializes deck, slides and lines
11  * function: markdown_analyse which is used to identify line wide formating
12  *           rules in given line
13  * function: markdown_debug to print a report of the generated data structure
14  * function: is_utf8 detects multi-byte char
15  * function: length_utf8 calculates the amount of bytes used for a multi-byte
16  *           char
17  * function: next_nonblank, next_blank, next_word to calculate string offset's
18  *
19  */
20
21 #include "markdown.h"
22
23 #define EXPAND_TABS 4
24 #define CODE_INDENT 4
25
26 deck_t *markdown_load(FILE *input);
27 int markdown_analyse(cstring_t *text);
28 void markdown_debug(deck_t *deck, int debug);
29 int is_utf8(char ch);
30 int length_utf8(char ch);
31 int next_nonblank(cstring_t *text, int i);
32 int next_blank(cstring_t *text, int i);
33 int next_word(cstring_t *text, int i);
34
35 #endif // !defined( PARSER_H )