- return(md_run_enter(args, &mbuf, &rbuf));
-}
-
-
-static int
-md_line_dummy(const struct md_args *args, struct md_mbuf *out,
- const struct md_rbuf *in, const char *buf, size_t sz)
-{
-
- assert(buf);
- assert(out);
- assert(in);
- assert(args);
-
- if ( ! md_buf_puts(out, buf, sz))
- return(0);
- if ( ! md_buf_putchar(out, '\n'))
- return(0);
-
- return(1);
-}
-
-
-static int
-md_exit_html4_strict(const struct md_args *args, struct md_mbuf *out)
-{
- char *tail;
-
- assert(out);
- assert(args);
-
- tail = " </pre>\n"
- " </body>\n"
- "</html>\n";
-
- if ( ! md_buf_putstring(out, tail))
- return(0);
-
- return(1);
-}
-
-
-static int
-md_init_html4_strict(const struct md_args *args, struct md_mbuf *out)
-{
- char *head;
-
- assert(out);
- assert(args);
-
- head = "<html>\n"
- " <head>\n"
- " <title>Manual Page</title>\n"
- " </head>\n"
- " <body>\n"
- " <pre>\n";
-
- if ( ! md_buf_putstring(out, head))
- return(0);
-
- return(1);
-}
-
-
-struct md_roff_macro {
- char name[2];
- int flags;
-#define MD_PARSED (1 << 0)
-#define MD_CALLABLE (1 << 1)
-#define MD_TITLE (1 << 2)
-};
-
-struct md_roff_macro[] = {
- { "Dd", MD_TITLE },
- { "Dt", MD_TITLE },
- { "Os", MD_TITLE },
- { "Sh", MD_PARSED },
-};
-
-
-static int
-md_roff(struct md_mbuf *out, const struct md_rbuf *in,
- const char *buf, size_t sz)
-{
-
- assert(out);
- assert(in);
- assert(buf);
- assert(sz >= 1);
-}
-
-
-static int
-md_line_html4_strict(const struct md_args *args, struct md_mbuf *out,
- const struct md_rbuf *in, const char *buf, size_t sz)
-{
-
- assert(args);
- assert(in);
-
- if (0 == sz) {
- warnx("%s: blank line (line %zu)", in->name, in->line);
- return(0);
- }
-
- if ('.' == *buf) {
- return(1);
- }
-
- return(md_buf_puts(out, buf, sz));