diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2009-10-13 10:57:25 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2009-10-13 10:57:25 +0000 |
commit | c73e1ec1c6a54b399da7b779448188ef6db6db68 (patch) | |
tree | 03658ba627049a18bc861428324a55cc63174686 /mdoc_term.c | |
parent | fd6f541ce489626cb695b97a00cee1e243aa40a4 (diff) | |
download | mandoc-c73e1ec1c6a54b399da7b779448188ef6db6db68.tar.gz |
Moved output definitions into main.h.
Pushed terminal_{mdoc,man} into {mdoc,man}_term.c.
Diffstat (limited to 'mdoc_term.c')
-rw-r--r-- | mdoc_term.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/mdoc_term.c b/mdoc_term.c index 08a546f5..4bba41de 100644 --- a/mdoc_term.c +++ b/mdoc_term.c @@ -25,6 +25,8 @@ #include "term.h" #include "mdoc.h" +#include "chars.h" +#include "main.h" #define INDENT 5 #define HALFINDENT 3 @@ -257,10 +259,23 @@ static void print_foot(DECL_ARGS); void -mdoc_run(struct termp *p, const struct mdoc *mdoc) +terminal_mdoc(void *arg, const struct mdoc *mdoc) { const struct mdoc_node *n; const struct mdoc_meta *m; + struct termp *p; + + p = (struct termp *)arg; + + if (NULL == p->symtab) + switch (p->enc) { + case (TERMENC_ASCII): + p->symtab = chars_init(CHARS_ASCII); + break; + default: + abort(); + /* NOTREACHED */ + } n = mdoc_node(mdoc); m = mdoc_meta(mdoc); |