summaryrefslogtreecommitdiffstats
path: root/man_validate.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2017-05-05 02:06:19 +0000
committerIngo Schwarze <schwarze@openbsd.org>2017-05-05 02:06:19 +0000
commitff9971487e60c2e6e8f7858745eea6520b1c0aa5 (patch)
tree59ed19f97ba7de3fc79a7183395fb59dfe16985f /man_validate.c
parent9ec7fd0e6d519550b4d3ae0ae9dd5c53d10e6cab (diff)
downloadmandoc-ff9971487e60c2e6e8f7858745eea6520b1c0aa5.tar.gz
Move handling of the roff(7) .ft request from the man(7)
modules to the new roff(7) modules. As a side effect, mdoc(7) now handles .ft, too. Of course, do not use that.
Diffstat (limited to 'man_validate.c')
-rw-r--r--man_validate.c46
1 files changed, 2 insertions, 44 deletions
diff --git a/man_validate.c b/man_validate.c
index c038b887..812e7743 100644
--- a/man_validate.c
+++ b/man_validate.c
@@ -48,7 +48,6 @@ static void check_text(CHKARGS);
static void post_AT(CHKARGS);
static void post_IP(CHKARGS);
static void post_vs(CHKARGS);
-static void post_ft(CHKARGS);
static void post_OP(CHKARGS);
static void post_TH(CHKARGS);
static void post_UC(CHKARGS);
@@ -85,7 +84,6 @@ static const v_check __man_valids[MAN_MAX - MAN_TH] = {
NULL, /* PD */
post_AT, /* AT */
NULL, /* in */
- post_ft, /* ft */
post_OP, /* OP */
NULL, /* EX */
NULL, /* EE */
@@ -131,7 +129,8 @@ man_node_validate(struct roff_man *man)
post_vs(man, n);
break;
default:
- abort();
+ roff_validate(man);
+ break;
}
break;
}
@@ -212,47 +211,6 @@ post_UR(CHKARGS)
}
static void
-post_ft(CHKARGS)
-{
- char *cp;
- int ok;
-
- if (n->child == NULL)
- return;
-
- ok = 0;
- cp = n->child->string;
- switch (*cp) {
- case '1':
- case '2':
- case '3':
- case '4':
- case 'I':
- case 'P':
- case 'R':
- if ('\0' == cp[1])
- ok = 1;
- break;
- case 'B':
- if ('\0' == cp[1] || ('I' == cp[1] && '\0' == cp[2]))
- ok = 1;
- break;
- case 'C':
- if ('W' == cp[1] && '\0' == cp[2])
- ok = 1;
- break;
- default:
- break;
- }
-
- if (0 == ok) {
- mandoc_vmsg(MANDOCERR_FT_BAD, man->parse,
- n->line, n->pos, "ft %s", cp);
- *cp = '\0';
- }
-}
-
-static void
check_part(CHKARGS)
{