diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2012-01-03 15:16:24 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2012-01-03 15:16:24 +0000 |
commit | 4873b4380a189665bf89eaa8180a9fc5696c5f73 (patch) | |
tree | 29e035a9b0675bbee7fd00013cc57264156045f6 /man_validate.c | |
parent | d807641d331b60b360442bd3bc4084baa0342b98 (diff) | |
download | mandoc-4873b4380a189665bf89eaa8180a9fc5696c5f73.tar.gz |
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.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/man_validate.c b/man_validate.c index c63dcdfc..822c64d2 100644 --- a/man_validate.c +++ b/man_validate.c @@ -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) |