X-Git-Url: https://git.danieliu.xyz/?a=blobdiff_plain;f=include%2Fparser.h;h=2690b20e27f9747a3e3338eb6e907d2238cd3f2c;hb=0c8a90b6cd07fb827135d7911a44c828eceee33b;hp=f7e684727c7aabd06212a4a46733316d50ea0d5f;hpb=32639324a5ed0b1678d1066680ed6d2e469ae271;p=smdp.git diff --git a/include/parser.h b/include/parser.h index f7e6847..2690b20 100644 --- a/include/parser.h +++ b/include/parser.h @@ -1,6 +1,40 @@ #if !defined( PARSER_H ) #define PARSER_H +/* + * Functions necessary to parse a file and transform its content into + * a deck of slides containing lines. All based on markdown formating + * rules. + * Copyright (C) 2014 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 . + * + * + * function: markdown_load is the main function which reads a file handle, + * and initializes deck, slides and lines + * function: markdown_analyse which is used to identify line wide formating + * rules in given line + * function: markdown_debug to print a report of the generated data structure + * function: is_utf8 detects multi-byte char + * function: length_utf8 calculates the amount of bytes used for a multi-byte + * char + * function: next_nonblank, next_blank, next_word to calculate string offset's + * + */ + #include "markdown.h" #define EXPAND_TABS 4 @@ -13,5 +47,6 @@ int is_utf8(char ch); int length_utf8(char ch); int next_nonblank(cstring_t *text, int i); int next_blank(cstring_t *text, int i); +int next_word(cstring_t *text, int i); #endif // !defined( PARSER_H )