Browse files

do not use discount internal header and structures

  • Loading branch information...
1 parent b02aa63 commit 158e64fc124b2e514fb725dae322c9c9d4450428 @ghedo ghedo committed Jan 23, 2012
Showing with 1 addition and 31 deletions.
  1. +1 −31 Discount.xs
View
32 Discount.xs
@@ -6,36 +6,6 @@
#include <string.h>
#include <mkdio.h>
-#include <cstring.h>
-
-typedef struct line {
- Cstring text;
- struct line *next;
- int dle;
-} Line;
-
-typedef struct paragraph {
- struct paragraph *next; /* next paragraph */
- struct paragraph *down; /* recompiled contents of this paragraph */
- struct line *text; /* all the text in this paragraph */
- char *ident; /* %id% tag for QUOTE */
- enum { WHITESPACE=0, CODE, QUOTE, MARKUP,
- HTML, STYLE, DL, UL, OL, AL, LISTITEM,
- HDR, HR } typ;
- enum { IMPLICIT=0, PARA, CENTER} align;
- int hnumber; /* <Hn> for typ == HDR */
-} Paragraph;
-
-typedef struct document {
- Line *headers; /* title -> author(s) -> date */
- ANCHOR(Line) content; /* uncompiled text, not valid after compile() */
- Paragraph *code; /* intermediate code generated by compile() */
- int compiled; /* set after mkd_compile() */
- int html; /* set after (internal) htmlify() */
- int tabstop; /* for properly expanding tabs (ick) */
- MMIOT *ctx; /* backend buffers, flags, and structures */
- char *base; /* url basename for url fragments */
-} Document;
MODULE = Text::Markdown::Discount PACKAGE = Text::Markdown::Discount PREFIX = TextMarkdown_
@@ -49,7 +19,7 @@ TextMarkdown__markdown(text)
int flags = MKD_NOHEADER|MKD_NOPANTS;
char *html = NULL;
int szhtml;
- Document *doc;
+ MMIOT *doc;
CODE:
if ( (doc = mkd_string(text, strlen(text), flags)) == 0 ) {
croak("failed at mkd_string");

0 comments on commit 158e64f

Please sign in to comment.