diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2012-02-26 19:41:28 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2012-02-26 19:41:28 +0000 |
commit | 4dae6e2e86f0631c3b64f8065b8086ae7ad57b3e (patch) | |
tree | 74e69628fd115e3c80a215ec12c44a29b9bbbadb /usr.bin/mandoc/man_validate.c | |
parent | 2915e4524b95e8bcabd96301c15030f4dc67bd24 (diff) |
Support .OP, one of the extended man macros; from kristaps@.
Do not use this GNU extension, we take it for compatibility only.
Diffstat (limited to 'usr.bin/mandoc/man_validate.c')
-rw-r--r-- | usr.bin/mandoc/man_validate.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/usr.bin/mandoc/man_validate.c b/usr.bin/mandoc/man_validate.c index 136e9cf110c..9f898e9ecf3 100644 --- a/usr.bin/mandoc/man_validate.c +++ b/usr.bin/mandoc/man_validate.c @@ -1,4 +1,4 @@ -/* $Id: man_validate.c,v 1.51 2011/12/02 01:45:43 schwarze Exp $ */ +/* $Id: man_validate.c,v 1.52 2012/02/26 19:41:27 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2010 Ingo Schwarze <schwarze@openbsd.org> @@ -41,6 +41,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); @@ -62,6 +63,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 }; @@ -95,8 +97,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 */ @@ -107,6 +109,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 */ }; @@ -228,6 +231,7 @@ check_##name(CHKARGS) \ } INEQ_DEFINE(0, ==, eq0) +INEQ_DEFINE(2, ==, eq2) INEQ_DEFINE(1, <=, le1) INEQ_DEFINE(2, >=, ge2) INEQ_DEFINE(5, <=, le5) |