From e012cb8b2706ff0d54c6b3b68fa79354484752dc Mon Sep 17 00:00:00 2001 From: Kristaps Dzonsons Date: Tue, 13 Oct 2009 10:57:25 +0000 Subject: Moved output definitions into main.h. Pushed terminal_{mdoc,man} into {mdoc,man}_term.c. --- mdoc_term.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'mdoc_term.c') diff --git a/mdoc_term.c b/mdoc_term.c index 722ca98a..46e02f86 100644 --- a/mdoc_term.c +++ b/mdoc_term.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_term.c,v 1.88 2009/10/10 11:05:23 kristaps Exp $ */ +/* $Id: mdoc_term.c,v 1.89 2009/10/13 10:57:25 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * @@ -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); -- cgit v1.2.3-56-ge451