summaryrefslogtreecommitdiffstatshomepage
path: root/term.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2009-04-03 11:08:39 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2009-04-03 11:08:39 +0000
commit65c1b92bb836a60e83ebd2bd3129acffcaa02420 (patch)
tree2d2b87559bb2e2eaae4562e09161a960b1885cb2 /term.c
parent0f15da4617d2cda375129998838b6bfd613901a4 (diff)
downloadmandoc-65c1b92bb836a60e83ebd2bd3129acffcaa02420.tar.gz
mandoc-65c1b92bb836a60e83ebd2bd3129acffcaa02420.tar.zst
mandoc-65c1b92bb836a60e83ebd2bd3129acffcaa02420.zip
Proper resetting of memory.
Array boundary fixed (-W).
Diffstat (limited to 'term.c')
-rw-r--r--term.c24
1 files changed, 16 insertions, 8 deletions
diff --git a/term.c b/term.c
index 180c5075..21918bc7 100644
--- a/term.c
+++ b/term.c
@@ -1,4 +1,4 @@
-/* $Id: term.c,v 1.71 2009/03/31 13:50:19 kristaps Exp $ */
+/* $Id: term.c,v 1.72 2009/04/03 11:08:39 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@openbsd.org>
*
@@ -54,8 +54,7 @@ ascii_alloc(void)
int
-terminal_run(void *arg, const struct man *man,
- const struct mdoc *mdoc)
+terminal_man(void *arg, const struct man *man)
{
struct termp *p;
@@ -64,12 +63,21 @@ terminal_run(void *arg, const struct man *man,
if (NULL == p->symtab)
p->symtab = term_ascii2htab();
- if (man)
- return(man_run(p, man));
- if (mdoc)
- return(mdoc_run(p, mdoc));
+ 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(1);
+ return(mdoc_run(p, mdoc));
}