-/* $Id: libmdocml.c,v 1.14 2008/11/29 14:14:21 kristaps Exp $ */
+/* $Id: libmdocml.c,v 1.18 2008/12/03 14:39:59 kristaps Exp $ */
/*
* Copyright (c) 2008 Kristaps Dzonsons <kristaps@kth.se>
*
/* Run exiters. */
switch (args->type) {
- case (MD_HTML4_STRICT):
- if ( ! md_exit_html4_strict(data, -1 == c ? 0 : 1))
+ case (MD_HTML):
+ if ( ! md_exit_html(data, -1 == c ? 0 : 1))
c = -1;
break;
default:
- if ( ! md_exit_valid(data, -1 == c ? 0 : 1))
+ if ( ! md_exit_xml(data, -1 == c ? 0 : 1))
c = -1;
break;
}
/* Make final flush of buffer. */
- if ( ! md_buf_flush(mbuf))
+ if (-1 != c && ! md_buf_flush(mbuf))
return(-1);
return(c);
/* Function ptrs to line-parsers. */
switch (args->type) {
- case (MD_HTML4_STRICT):
- fp = md_line_html4_strict;
+ case (MD_HTML):
+ fp = md_line_html;
break;
default:
- fp = md_line_valid;
+ fp = md_line_xml;
break;
}
return(md_run_leave(args, mbuf, rbuf, -1, p));
}
- line[pos] = 0;
+ line[(int)pos] = 0;
if ( ! (*fp)(p, line))
return(md_run_leave(args, mbuf, rbuf, -1, p));
rbuf->line++;
/* Run initialisers. */
switch (args->type) {
- case (MD_HTML4_STRICT):
- data = md_init_html4_strict
- (args, &mbuf, &rbuf);
+ case (MD_HTML):
+ data = md_init_html(args, &mbuf, &rbuf);
break;
default:
- data = md_init_valid
- (args, &mbuf, &rbuf);
+ data = md_init_xml(args, &mbuf, &rbuf);
break;
}