summaryrefslogtreecommitdiffstats
path: root/usr.bin/mandoc/main.c
diff options
context:
space:
mode:
authorschwarze <schwarze@openbsd.org>2009-09-21 20:57:57 +0000
committerschwarze <schwarze@openbsd.org>2009-09-21 20:57:57 +0000
commit6ae2e8ac2284c07a57ce7cd8ad0c517050260a96 (patch)
treecdac5d6c690a8add43221b5645f173077d61c2ca /usr.bin/mandoc/main.c
parentExpand "&" in the name part of gecos similarly to how sendmail and finger (diff)
downloadwireguard-openbsd-6ae2e8ac2284c07a57ce7cd8ad0c517050260a96.tar.xz
wireguard-openbsd-6ae2e8ac2284c07a57ce7cd8ad0c517050260a96.zip
sync to 1.9.5: make terminal_*, tree_* and out_* functions return void,
making the code simpler
Diffstat (limited to 'usr.bin/mandoc/main.c')
-rw-r--r--usr.bin/mandoc/main.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/usr.bin/mandoc/main.c b/usr.bin/mandoc/main.c
index f08a38e4e4d..e8f76223343 100644
--- a/usr.bin/mandoc/main.c
+++ b/usr.bin/mandoc/main.c
@@ -1,4 +1,4 @@
-/* $Id: main.c,v 1.15 2009/08/22 17:21:23 schwarze Exp $ */
+/* $Id: main.c,v 1.16 2009/09/21 20:57:57 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -27,8 +27,8 @@
#include "mdoc.h"
#include "man.h"
-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 {
@@ -73,10 +73,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 *);
@@ -437,11 +437,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);
}