"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "markdown.h" between
discount-2.2.3a.tar.bz2 and discount-2.2.4.tar.bz2

About: Discount is an implementation of the "Markdown" markup language (written in C).

markdown.h  (discount-2.2.3a.tar.bz2):markdown.h  (discount-2.2.4.tar.bz2)
#ifndef _MARKDOWN_D #ifndef _MARKDOWN_D
#define _MARKDOWN_D #define _MARKDOWN_D
#include "config.h" #include "config.h"
#include "cstring.h" #include "cstring.h"
/* reference-style links (and images) are stored in an array
* of footnotes.
*/
typedef struct footnote {
Cstring tag; /* the tag for the reference link */
Cstring link; /* what this footnote points to */
Cstring title; /* what it's called (TITLE= attribute) */
int height, width; /* dimensions (for image link) */
int dealloc; /* deallocation needed? */
int refnumber;
int flags;
#define EXTRA_BOOKMARK 0x01
#define REFERENCED 0x02
} Footnote;
/* each input line is read into a Line, which contains the line, /* each input line is read into a Line, which contains the line,
* the offset of the first non-space character [this assumes * the offset of the first non-space character [this assumes
* that all tabs will be expanded to spaces!], and a pointer to * that all tabs will be expanded to spaces!], and a pointer to
* the next line. * the next line.
*/ */
typedef enum { chk_text, chk_code, typedef enum { chk_text, chk_code,
chk_hr, chk_dash, chk_hr, chk_dash,
chk_tilde, chk_backtick, chk_tilde, chk_backtick,
chk_equal } line_type; chk_equal } line_type;
typedef struct line { typedef struct line {
skipping to change at line 58 skipping to change at line 43
struct paragraph *next; /* next paragraph */ struct paragraph *next; /* next paragraph */
struct paragraph *down; /* recompiled contents of this paragraph */ struct paragraph *down; /* recompiled contents of this paragraph */
struct line *text; /* all the text in this paragraph */ struct line *text; /* all the text in this paragraph */
char *ident; /* %id% tag for QUOTE */ char *ident; /* %id% tag for QUOTE */
char *lang; /* lang attribute for CODE */ char *lang; /* lang attribute for CODE */
enum { WHITESPACE=0, CODE, QUOTE, MARKUP, enum { WHITESPACE=0, CODE, QUOTE, MARKUP,
HTML, STYLE, DL, UL, OL, AL, LISTITEM, HTML, STYLE, DL, UL, OL, AL, LISTITEM,
HDR, HR, TABLE, SOURCE } typ; HDR, HR, TABLE, SOURCE } typ;
enum { IMPLICIT=0, PARA, CENTER} align; enum { IMPLICIT=0, PARA, CENTER} align;
int hnumber; /* <Hn> for typ == HDR */ int hnumber; /* <Hn> for typ == HDR */
#if GITHUB_CHECKBOX
int flags;
#define GITHUB_CHECK 0x01
#define IS_CHECKED 0x02
#endif
} Paragraph; } Paragraph;
enum { ETX, SETEXT }; /* header types */ enum { ETX, SETEXT }; /* header types */
/* reference-style links (and images) are stored in an array
* of footnotes.
*/
typedef struct footnote {
Cstring tag; /* the tag for the reference link */
Cstring link; /* what this footnote points to */
Cstring title; /* what it's called (TITLE= attribute) */
Paragraph *text; /* EXTRA_FOOTNOTE content */
int height, width; /* dimensions (for image link) */
int dealloc; /* deallocation needed? */
int refnumber;
int flags;
#define EXTRA_FOOTNOTE 0x01
#define REFERENCED 0x02
} Footnote;
typedef struct block { typedef struct block {
enum { bTEXT, bSTAR, bUNDER } b_type; enum { bTEXT, bSTAR, bUNDER } b_type;
int b_count; int b_count;
char b_char; char b_char;
Cstring b_text; Cstring b_text;
Cstring b_post; Cstring b_post;
} block; } block;
typedef STRING(block) Qblock; typedef STRING(block) Qblock;
skipping to change at line 224 skipping to change at line 231
extern void ___mkd_initmmiot(MMIOT *, void *); extern void ___mkd_initmmiot(MMIOT *, void *);
extern void ___mkd_freemmiot(MMIOT *, void *); extern void ___mkd_freemmiot(MMIOT *, void *);
extern void ___mkd_freeLineRange(Line *, Line *); extern void ___mkd_freeLineRange(Line *, Line *);
extern void ___mkd_xml(char *, int, FILE *); extern void ___mkd_xml(char *, int, FILE *);
extern void ___mkd_reparse(char *, int, int, MMIOT*, char*); extern void ___mkd_reparse(char *, int, int, MMIOT*, char*);
extern void ___mkd_emblock(MMIOT*); extern void ___mkd_emblock(MMIOT*);
extern void ___mkd_tidy(Cstring *); extern void ___mkd_tidy(Cstring *);
extern Document *__mkd_new_Document(); extern Document *__mkd_new_Document();
extern void __mkd_enqueue(Document*, Cstring *); extern void __mkd_enqueue(Document*, Cstring *);
extern void __mkd_header_dle(Line *); extern void __mkd_trim_line(Line *, int);
extern int __mkd_io_strget(struct string_stream *); extern int __mkd_io_strget(struct string_stream *);
/* utility function to do some operation and exit the current function /* utility function to do some operation and exit the current function
* if it fails * if it fails
*/ */
#define DO_OR_DIE(op) if ( (op) == EOF ) return EOF; else 1 #define DO_OR_DIE(op) if ( (op) == EOF ) return EOF; else 1
#endif/*_MARKDOWN_D*/ #endif/*_MARKDOWN_D*/
 End of changes. 4 change blocks. 
16 lines changed or deleted 23 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)