X-Git-Url: https://git.danieliu.xyz/?a=blobdiff_plain;f=include%2Fparser.h;h=751afdd49533f1e97ecb24316577348937529ac7;hb=c3bcbda5c26b9234b6207b4c6fb85ab1565d9d0b;hp=23cd12f625ff2e668c6aa2d793203d375916aa1a;hpb=4b8ad1b3b464836eca2e876dd418a8e8d87bd721;p=smdp.git diff --git a/include/parser.h b/include/parser.h index 23cd12f..751afdd 100644 --- a/include/parser.h +++ b/include/parser.h @@ -5,7 +5,7 @@ * 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 + * Copyright (C) 2018 Michael Goehler * * This file is part of mdp. * @@ -25,7 +25,7 @@ * * 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 + * function: markdown_analyse which is used to identify line wide formatting * rules in given line * function: markdown_debug to print a report of the generated data structure * function: adjust_line_length to calculate line length excluding markup @@ -40,17 +40,25 @@ #include "markdown.h" #include "cstack.h" +#if defined( CYGWIN ) +#undef WEOF +#define WEOF (0xffff) +#endif // defined( CYGWIN ) + #define EXPAND_TABS 4 #define CODE_INDENT 4 #define UNORDERED_LIST_MAX_LEVEL 3 -deck_t *markdown_load(FILE *input); +deck_t *markdown_load(FILE *input, int noexpand); int markdown_analyse(cstring_t *text, int prev); void markdown_debug(deck_t *deck, int debug); +void expand_character_entities(line_t *line); void adjust_line_length(line_t *line); int next_nonblank(cstring_t *text, int i); int prev_blank(cstring_t *text, int i); int next_blank(cstring_t *text, int i); int next_word(cstring_t *text, int i); +int next_nontilde(cstring_t *text, int i); +int next_nonbacktick(cstring_t *text, int i); #endif // !defined( PARSER_H )