summaryrefslogtreecommitdiffstatshomepage
path: root/main.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2009-03-23 15:20:51 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2009-03-23 15:20:51 +0000
commit1b03ebdce412e8ef752ed49e9aba8d666cdc9bf2 (patch)
tree961feffeeaf7e4b586c02cd6ba5c3ba04fe0d90e /main.c
parent9e1962924d277421ea2bce83eed6738227fc0b54 (diff)
downloadmandoc-1b03ebdce412e8ef752ed49e9aba8d666cdc9bf2.tar.gz
mandoc-1b03ebdce412e8ef752ed49e9aba8d666cdc9bf2.tar.zst
mandoc-1b03ebdce412e8ef752ed49e9aba8d666cdc9bf2.zip
-man printing linked to -Ttree.
Diffstat (limited to 'main.c')
-rw-r--r--main.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/main.c b/main.c
index 61ed7b72..6e0ed5c8 100644
--- a/main.c
+++ b/main.c
@@ -1,4 +1,4 @@
-/* $Id: main.c,v 1.10 2009/03/23 14:22:11 kristaps Exp $ */
+/* $Id: main.c,v 1.11 2009/03/23 15:20:51 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@openbsd.org>
*
@@ -67,7 +67,8 @@ enum outt {
OUTT_LINT
};
-typedef int (*out_run)(void *, const struct mdoc *);
+typedef int (*out_run)(void *, const struct man *,
+ const struct mdoc *);
typedef void (*out_free)(void *);
extern char *__progname;
@@ -75,8 +76,10 @@ extern char *__progname;
extern void *ascii_alloc(void);
extern void *latin1_alloc(void);
extern void *utf8_alloc(void);
-extern int terminal_run(void *, const struct mdoc *);
-extern int tree_run(void *, const struct mdoc *);
+extern int terminal_run(void *, const struct man *,
+ const struct mdoc *);
+extern int tree_run(void *, const struct man *,
+ const struct mdoc *);
extern void terminal_free(void *);
static int foptions(int *, char *);
@@ -219,20 +222,16 @@ main(int argc, char *argv[])
if (c && NULL == outrun)
rc = 1;
-#if 0
- else if (c && outrun && (*outrun)(outdata, mdoc))
+ else if (c && outrun && (*outrun)(outdata, man, mdoc))
rc = 1;
-#endif
} else {
while (*argv) {
curp.file = *argv;
c = file(&blk, &ln, *argv, man, mdoc);
if ( ! c)
break;
-#if 0
- if (outrun && ! (*outrun)(outdata, mdoc))
+ if (outrun && ! (*outrun)(outdata, man, mdoc))
break;
-#endif
if (man)
man_reset(man);
if (mdoc)