summaryrefslogtreecommitdiffstatshomepage
path: root/main.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2009-09-16 09:41:24 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2009-09-16 09:41:24 +0000
commit6cbefd50d90dc947c06ea2212c4d3552c4a36c84 (patch)
treed619d6d32e6db6da1019b07c4b26c1cb7c294016 /main.c
parent5e3756471dbadb7858086a17760f20e36e105612 (diff)
downloadmandoc-6cbefd50d90dc947c06ea2212c4d3552c4a36c84.tar.gz
mandoc-6cbefd50d90dc947c06ea2212c4d3552c4a36c84.tar.zst
mandoc-6cbefd50d90dc947c06ea2212c4d3552c4a36c84.zip
Made tree/term/out() functions return void.
Put err() functions back into front-ends (no use making it needlessly complex).
Diffstat (limited to 'main.c')
-rw-r--r--main.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/main.c b/main.c
index 9a52d807..f0700bcb 100644
--- a/main.c
+++ b/main.c
@@ -1,4 +1,4 @@
-/* $Id: main.c,v 1.41 2009/07/28 10:15:12 kristaps Exp $ */
+/* $Id: main.c,v 1.42 2009/09/16 09:41:24 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -40,8 +40,8 @@ extern int getsubopt(char **, char * const *, char **);
# endif
#endif
-typedef int (*out_mdoc)(void *, const struct mdoc *);
-typedef int (*out_man)(void *, const struct man *);
+typedef void (*out_mdoc)(void *, const struct mdoc *);
+typedef void (*out_man)(void *, const struct man *);
typedef void (*out_free)(void *);
struct buf {
@@ -86,10 +86,10 @@ struct curparse {
};
extern void *ascii_alloc(void);
-extern int tree_mdoc(void *, const struct mdoc *);
-extern int tree_man(void *, const struct man *);
-extern int terminal_mdoc(void *, const struct mdoc *);
-extern int terminal_man(void *, const struct man *);
+extern void tree_mdoc(void *, const struct mdoc *);
+extern void tree_man(void *, const struct man *);
+extern void terminal_mdoc(void *, const struct mdoc *);
+extern void terminal_man(void *, const struct man *);
extern void terminal_free(void *);
static int foptions(int *, char *);
@@ -450,11 +450,9 @@ fdesc(struct buf *blk, struct buf *ln, struct curparse *curp)
/* Execute the out device, if it exists. */
if (man && curp->outman)
- if ( ! (*curp->outman)(curp->outdata, man))
- return(-1);
+ (*curp->outman)(curp->outdata, man);
if (mdoc && curp->outmdoc)
- if ( ! (*curp->outmdoc)(curp->outdata, mdoc))
- return(-1);
+ (*curp->outmdoc)(curp->outdata, mdoc);
return(1);
}