summaryrefslogtreecommitdiffstats
path: root/usr.bin/mandoc/man_validate.c
diff options
context:
space:
mode:
authorschwarze <schwarze@openbsd.org>2015-04-02 22:06:17 +0000
committerschwarze <schwarze@openbsd.org>2015-04-02 22:06:17 +0000
commit3a0d07af35c4924328de84e2ae1edf356f8ef40f (patch)
tree1468fe8c7cc50a045d63456530f3186683c9976e /usr.bin/mandoc/man_validate.c
parentPrevent integer overflow when parsing -S argument as percentage. (diff)
downloadwireguard-openbsd-3a0d07af35c4924328de84e2ae1edf356f8ef40f.tar.xz
wireguard-openbsd-3a0d07af35c4924328de84e2ae1edf356f8ef40f.zip
Second step towards parser unification:
Replace struct mdoc_node and struct man_node by a unified struct roff_node. To be able to use the tok member for both mdoc(7) and man(7) without defining all the macros in roff.h, sacrifice a tiny bit of type safety and make tok an int rather than an enum. Almost mechanical, no functional change. Written on the Eurostar from Bruxelles to London on the way to p2k15.
Diffstat (limited to 'usr.bin/mandoc/man_validate.c')
-rw-r--r--usr.bin/mandoc/man_validate.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.bin/mandoc/man_validate.c b/usr.bin/mandoc/man_validate.c
index a0e408cac5c..5dff3c59eb4 100644
--- a/usr.bin/mandoc/man_validate.c
+++ b/usr.bin/mandoc/man_validate.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: man_validate.c,v 1.85 2015/04/02 21:03:18 schwarze Exp $ */
+/* $OpenBSD: man_validate.c,v 1.86 2015/04/02 22:06:17 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010, 2012-2015 Ingo Schwarze <schwarze@openbsd.org>
@@ -33,7 +33,7 @@
#include "libmandoc.h"
#include "libman.h"
-#define CHKARGS struct man *man, struct man_node *n
+#define CHKARGS struct man *man, struct roff_node *n
typedef void (*v_check)(CHKARGS);
@@ -98,7 +98,7 @@ static v_check man_valids[MAN_MAX] = {
void
man_valid_post(struct man *man)
{
- struct man_node *n;
+ struct roff_node *n;
v_check *cp;
n = man->last;
@@ -298,7 +298,7 @@ post_IP(CHKARGS)
static void
post_TH(CHKARGS)
{
- struct man_node *nb;
+ struct roff_node *nb;
const char *p;
free(man->meta.title);
@@ -458,8 +458,8 @@ post_AT(CHKARGS)
"System V Release 2",
};
+ struct roff_node *nn;
const char *p, *s;
- struct man_node *nn;
n = n->child;