From f98cf823475cf1b354a213c9bf26d7927e50c14b Mon Sep 17 00:00:00 2001 From: Kristaps Dzonsons Date: Fri, 20 Feb 2009 11:04:23 +0000 Subject: Re-added tree.c (for now). Added initial terminal-output filter (term.c). --- mdocml.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'mdocml.c') diff --git a/mdocml.c b/mdocml.c index 84665dbb..3d384ff2 100644 --- a/mdocml.c +++ b/mdocml.c @@ -1,4 +1,4 @@ - /* $Id: mdocml.c,v 1.51 2009/02/20 07:43:15 kristaps Exp $ */ + /* $Id: mdocml.c,v 1.52 2009/02/20 11:04:23 kristaps Exp $ */ /* * Copyright (c) 2008 Kristaps Dzonsons * @@ -224,6 +224,8 @@ buf_begin(struct md_parse *p) static int parse_leave(struct md_parse *p, int code) { + extern int termprint(const struct mdoc_node *, + const struct mdoc_meta *); if (NULL == p->mdoc) return(code); @@ -231,13 +233,9 @@ parse_leave(struct md_parse *p, int code) if ( ! mdoc_endparse(p->mdoc)) code = 0; -#if 0 /* TODO */ - if (code && ! mdoc_write(p->out, mdoc_node(p->mdoc))) { - warnx("%s: write error", p->out); + if (code && ! termprint(mdoc_node(p->mdoc), mdoc_meta(p->mdoc))) code = 0; - } -#endif mdoc_free(p->mdoc); return(code); -- cgit v1.2.3