+ return(md_run_leave(args, mbuf, rbuf, 0));
+}
+
+
+int
+md_run(const struct md_args *args,
+ const struct md_buf *out, const struct md_buf *in)
+{
+ struct md_mbuf mbuf;
+ struct md_rbuf rbuf;
+
+ assert(args);
+ assert(in);
+ assert(out);
+
+ (void)memcpy(&mbuf, out, sizeof(struct md_buf));
+ (void)memcpy(&rbuf, in, sizeof(struct md_buf));
+
+ mbuf.pos = 0;
+ rbuf.line = 1;
+
+ /* Run initialisers. */
+ switch (args->type) {
+ case (MD_HTML4_STRICT):
+ if ( ! md_init_html4_strict(args, &mbuf))
+ return(-1);
+ break;
+ case (MD_DUMMY):
+ break;
+ default:
+ abort();
+ }
+
+ /* Go into mainline. */
+ return(md_run_enter(args, &mbuf, &rbuf));