summaryrefslogtreecommitdiffstats
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
commit911f176059aea8dbb5085d2191f4ae34fd849764 (patch)
tree87cea0a5fbd273073ab682ffd0da3c127044a6a0 /term.c
parent487ee230ace82c4c67ac49c3c7192780298017de (diff)
downloadmandoc-911f176059aea8dbb5085d2191f4ae34fd849764.tar.gz
Proper resetting of memory.
Array boundary fixed (-W).
Diffstat (limited to 'term.c')
-rw-r--r--term.c22
1 files changed, 15 insertions, 7 deletions
diff --git a/term.c b/term.c
index 76f25aaa..275b9b62 100644
--- a/term.c
+++ b/term.c
@@ -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));
}