aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/man_validate.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2012-01-03 15:16:24 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2012-01-03 15:16:24 +0000
commitd346448c959f7b9855c02917b358cfb0da2525e8 (patch)
tree1339709d2371873603f713f958f83cc8daa1a231 /man_validate.c
parent484b430b59995e6ddf4b84461fdcc0c3a757addb (diff)
downloadmandoc-d346448c959f7b9855c02917b358cfb0da2525e8.tar.gz
mandoc-d346448c959f7b9855c02917b358cfb0da2525e8.tar.zst
mandoc-d346448c959f7b9855c02917b358cfb0da2525e8.zip
Add support for `OP', one of the extended man macros. This also requires
some man(7) changes to accomodate for the an-ext compatibility.
Diffstat (limited to 'man_validate.c')
-rw-r--r--man_validate.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/man_validate.c b/man_validate.c
index bf266ca6..e40b089f 100644
--- a/man_validate.c
+++ b/man_validate.c
@@ -1,4 +1,4 @@
-/* $Id: man_validate.c,v 1.79 2011/12/02 01:37:14 schwarze Exp $ */
+/* $Id: man_validate.c,v 1.80 2012/01/03 15:16:24 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010 Ingo Schwarze <schwarze@openbsd.org>
@@ -45,6 +45,7 @@ struct man_valid {
};
static int check_eq0(CHKARGS);
+static int check_eq2(CHKARGS);
static int check_le1(CHKARGS);
static int check_ge2(CHKARGS);
static int check_le5(CHKARGS);
@@ -66,6 +67,7 @@ static int pre_sec(CHKARGS);
static v_check posts_at[] = { post_AT, NULL };
static v_check posts_br[] = { post_vs, check_eq0, NULL };
static v_check posts_eq0[] = { check_eq0, NULL };
+static v_check posts_eq2[] = { check_eq2, NULL };
static v_check posts_fi[] = { check_eq0, post_fi, NULL };
static v_check posts_ft[] = { post_ft, NULL };
static v_check posts_nf[] = { check_eq0, post_nf, NULL };
@@ -99,8 +101,8 @@ static const struct man_valid man_valids[MAN_MAX] = {
{ NULL, NULL }, /* I */
{ NULL, NULL }, /* IR */
{ NULL, NULL }, /* RI */
- { NULL, posts_eq0 }, /* na */ /* FIXME: should warn only. */
- { NULL, posts_sp }, /* sp */ /* FIXME: should warn only. */
+ { NULL, posts_eq0 }, /* na */
+ { NULL, posts_sp }, /* sp */
{ NULL, posts_nf }, /* nf */
{ NULL, posts_fi }, /* fi */
{ NULL, NULL }, /* RE */
@@ -111,6 +113,7 @@ static const struct man_valid man_valids[MAN_MAX] = {
{ NULL, posts_at }, /* AT */
{ NULL, NULL }, /* in */
{ NULL, posts_ft }, /* ft */
+ { NULL, posts_eq2 }, /* OP */
};
@@ -232,6 +235,7 @@ check_##name(CHKARGS) \
}
INEQ_DEFINE(0, ==, eq0)
+INEQ_DEFINE(2, ==, eq2)
INEQ_DEFINE(1, <=, le1)
INEQ_DEFINE(2, >=, ge2)
INEQ_DEFINE(5, <=, le5)