-#include "man.h"
-#include "mdoc.h"
-
-extern int man_run(struct termp *,
- const struct man *);
-extern int mdoc_run(struct termp *,
- const struct mdoc *);
-
-static struct termp *term_alloc(enum termenc);
-static void term_free(struct termp *);
-static void term_pescape(struct termp *, const char **);
-static void term_nescape(struct termp *,
- const char *, size_t);
-static void term_chara(struct termp *, char);
-static void term_encodea(struct termp *, char);
-static int term_isopendelim(const char *);
-static int term_isclosedelim(const char *);
-
-
-void *
-ascii_alloc(void)
-{
-
- return(term_alloc(TERMENC_ASCII));
-}
-
-
-int
-terminal_man(void *arg, const struct man *man)
-{
- struct termp *p;
-
- p = (struct termp *)arg;
- if (NULL == p->symtab)
- p->symtab = term_ascii2htab();
-
- return(man_run(p, man));
-}
-
-
-int
-terminal_mdoc(void *arg, const struct mdoc *mdoc)
-{
- struct termp *p;
-
- p = (struct termp *)arg;
- if (NULL == p->symtab)
- p->symtab = term_ascii2htab();
-
- return(mdoc_run(p, mdoc));
-}