Skip to content

Commit

Permalink
Upgraded discount to v2.0, mkdio.h moved to discount-config
Browse files Browse the repository at this point in the history
  • Loading branch information
vdh committed Jan 20, 2011
1 parent 54fea66 commit 9fe95a8
Show file tree
Hide file tree
Showing 4 changed files with 103 additions and 3 deletions.
4 changes: 2 additions & 2 deletions MarkdownLive.xcodeproj/project.pbxproj
Expand Up @@ -40,8 +40,8 @@
2269369A12E7C6AB00171322 /* html5.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = html5.c; sourceTree = "<group>"; };
2269369E12E7C6BE00171322 /* tags.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tags.c; sourceTree = "<group>"; };
2269369F12E7C6BE00171322 /* tags.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tags.h; sourceTree = "<group>"; };
226936B912E7C8B600171322 /* mkdio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mkdio.h; sourceTree = "<group>"; };
22ECEEC612E7C258003B50DC /* config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = config.h; sourceTree = "<group>"; };
22ECEED212E7C2B4003B50DC /* mkdio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mkdio.h; sourceTree = "<group>"; };
22ECEED912E7C2E8003B50DC /* markdown.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = markdown.h; sourceTree = "<group>"; };
2564AD2C0F5327BB00F57823 /* MarkdownLive_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MarkdownLive_Prefix.pch; sourceTree = "<group>"; };
2A37F4ACFDCFA73011CA2CEA /* MyDocument.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MyDocument.m; sourceTree = "<group>"; };
Expand Down Expand Up @@ -111,6 +111,7 @@
22ECEEC512E7C258003B50DC /* discount-config */ = {
isa = PBXGroup;
children = (
226936B912E7C8B600171322 /* mkdio.h */,
22ECEEC612E7C258003B50DC /* config.h */,
);
path = "discount-config";
Expand Down Expand Up @@ -174,7 +175,6 @@
795F6C4D105D6EA500D1F90A /* discount */ = {
isa = PBXGroup;
children = (
22ECEED212E7C2B4003B50DC /* mkdio.h */,
795F6C4E105D6EC400D1F90A /* mkdio.c */,
22ECEED912E7C2E8003B50DC /* markdown.h */,
795F6C50105D6ECE00D1F90A /* markdown.c */,
Expand Down
2 changes: 1 addition & 1 deletion discount
Submodule discount updated 24 files
+4 −1 Makefile.in
+1 −1 VERSION
+16 −8 configure.inc
+2 −29 configure.sh
+2 −1 css.c
+40 −38 generate.c
+22 −17 main.c
+55 −29 markdown.1
+24 −2 markdown.3
+32 −34 markdown.c
+32 −27 markdown.h
+5 −13 mkd-extensions.7
+30 −25 mkdio.c
+0 −90 mkdio.h
+97 −0 mkdio.h.in
+2 −7 tests/dl.t
+1 −1 tests/linkylinky.t
+5 −15 tests/pandoc.t
+3 −1 tests/pseudo.t
+2 −2 tests/tabstop.t
+3 −4 tests/toc.t
+17 −16 toc.c
+11 −0 tools/checkbits.sh
+0 −18 version.c.in
3 changes: 3 additions & 0 deletions discount-config/config.h
Expand Up @@ -3,6 +3,9 @@


#define OS_DARWIN 1
#define DWORD unsigned int
#define WORD unsigned short
#define BYTE unsigned char
#define HAVE_PWD_H 1
#define HAVE_GETPWUID 1
#define HAVE_SRANDOM 1
Expand Down
97 changes: 97 additions & 0 deletions discount-config/mkdio.h
@@ -0,0 +1,97 @@
#ifndef _MKDIO_D
#define _MKDIO_D

#include <stdio.h>

typedef void MMIOT;

typedef unsigned int mkd_flag_t;

/* line builder for markdown()
*/
MMIOT *mkd_in(FILE*,mkd_flag_t); /* assemble input from a file */
MMIOT *mkd_string(char*,int,mkd_flag_t); /* assemble input from a buffer */

void mkd_basename(MMIOT*,char*);

/* compilation, debugging, cleanup
*/
int mkd_compile(MMIOT*, mkd_flag_t);
int mkd_cleanup(MMIOT*);

/* markup functions
*/
int mkd_dump(MMIOT*, FILE*, int, char*);
int markdown(MMIOT*, FILE*, mkd_flag_t);
int mkd_line(char *, int, char **, mkd_flag_t);
void mkd_string_to_anchor(char *, int, int (*)(int,void*), void*, int);
int mkd_xhtmlpage(MMIOT*,int,FILE*);

/* header block access
*/
char* mkd_doc_title(MMIOT*);
char* mkd_doc_author(MMIOT*);
char* mkd_doc_date(MMIOT*);

/* compiled data access
*/
int mkd_document(MMIOT*, char**);
int mkd_toc(MMIOT*, char**);
int mkd_css(MMIOT*, char **);
int mkd_xml(char *, int, char **);

/* write-to-file functions
*/
int mkd_generatehtml(MMIOT*,FILE*);
int mkd_generatetoc(MMIOT*,FILE*);
int mkd_generatexml(char *, int,FILE*);
int mkd_generatecss(MMIOT*,FILE*);
#define mkd_style mkd_generatecss
int mkd_generateline(char *, int, FILE*, mkd_flag_t);
#define mkd_text mkd_generateline

/* url generator callbacks
*/
typedef char * (*mkd_callback_t)(const char*, const int, void*);
typedef void (*mkd_free_t)(char*, void*);

void mkd_e_url(void *, mkd_callback_t);
void mkd_e_flags(void *, mkd_callback_t);
void mkd_e_free(void *, mkd_free_t );
void mkd_e_data(void *, void *);

/* version#.
*/
extern char markdown_version[];

/* special flags for markdown() and mkd_text()
*/
#define MKD_NOLINKS 0x00000001 /* don't do link processing, block <a> tags */
#define MKD_NOIMAGE 0x00000002 /* don't do image processing, block <img> */
#define MKD_NOPANTS 0x00000004 /* don't run smartypants() */
#define MKD_NOHTML 0x00000008 /* don't allow raw html through AT ALL */
#define MKD_STRICT 0x00000010 /* disable SUPERSCRIPT, RELAXED_EMPHASIS */
#define MKD_TAGTEXT 0x00000020 /* process text inside an html tag; no
* <em>, no <bold>, no html or [] expansion */
#define MKD_NO_EXT 0x00000040 /* don't allow pseudo-protocols */
#define MKD_CDATA 0x00000080 /* generate code for xml ![CDATA[...]] */
#define MKD_NOSUPERSCRIPT 0x00000100 /* no A^B */
#define MKD_NORELAXED 0x00000200 /* emphasis happens /everywhere/ */
#define MKD_NOTABLES 0x00000400 /* disallow tables */
#define MKD_NOSTRIKETHROUGH 0x00000800 /* forbid ~~strikethrough~~ */
#define MKD_TOC 0x00001000 /* do table-of-contents processing */
#define MKD_1_COMPAT 0x00002000 /* compatability with MarkdownTest_1.0 */
#define MKD_AUTOLINK 0x00004000 /* make http://foo.com link even without <>s */
#define MKD_SAFELINK 0x00008000 /* paranoid check for link protocol */
#define MKD_NOHEADER 0x00010000 /* don't process header blocks */
#define MKD_TABSTOP 0x00020000 /* expand tabs to 4 spaces */
#define MKD_NODIVQUOTE 0x00040000 /* forbid >%class% blocks */
#define MKD_NOALPHALIST 0x00080000 /* forbid alphabetic lists */
#define MKD_NODLIST 0x00100000 /* forbid definition lists */
#define MKD_EMBED MKD_NOLINKS|MKD_NOIMAGE|MKD_TAGTEXT

/* special flags for mkd_in() and mkd_string()
*/


#endif/*_MKDIO_D*/

0 comments on commit 9fe95a8

Please sign in to comment.