summaryrefslogtreecommitdiffstats
path: root/mdoc_man.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2018-12-03 21:00:10 +0000
committerIngo Schwarze <schwarze@openbsd.org>2018-12-03 21:00:10 +0000
commitd504e7480ce979e924b1c4fe82bdbcaa790ca153 (patch)
treebf04b3cdea5ee4c901f9affaca31b1278bbb3272 /mdoc_man.c
parentb612c0fc16de6270d13910388974b03b6bf27af8 (diff)
downloadmandoc-d504e7480ce979e924b1c4fe82bdbcaa790ca153.tar.gz
In the validators, translate obsolete macro aliases (Lp, Ot, LP, P)
to the standard forms (Pp, Ft, PP) up front, such that later code does not need to look for the obsolete versions. This reduces the risk of incomplete handling.
Diffstat (limited to 'mdoc_man.c')
-rw-r--r--mdoc_man.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/mdoc_man.c b/mdoc_man.c
index a4f8b3ab..ce337acd 100644
--- a/mdoc_man.c
+++ b/mdoc_man.c
@@ -75,6 +75,7 @@ static void post_pf(DECL_ARGS);
static void post_sect(DECL_ARGS);
static void post_vt(DECL_ARGS);
static int pre__t(DECL_ARGS);
+static int pre_abort(DECL_ARGS);
static int pre_an(DECL_ARGS);
static int pre_ap(DECL_ARGS);
static int pre_aq(DECL_ARGS);
@@ -172,7 +173,7 @@ static const struct mdoc_man_act mdoc_man_acts[MDOC_MAX - MDOC_Dd] = {
{ cond_head, pre_enc, NULL, "\\- ", NULL }, /* Nd */
{ NULL, pre_nm, post_nm, NULL, NULL }, /* Nm */
{ cond_body, pre_enc, post_enc, "[", "]" }, /* Op */
- { NULL, pre_Ft, post_font, NULL, NULL }, /* Ot */
+ { NULL, pre_abort, NULL, NULL, NULL }, /* Ot */
{ NULL, pre_em, post_font, NULL, NULL }, /* Pa */
{ NULL, pre_ex, NULL, NULL, NULL }, /* Rv */
{ NULL, NULL, NULL, NULL, NULL }, /* St */
@@ -245,7 +246,7 @@ static const struct mdoc_man_act mdoc_man_acts[MDOC_MAX - MDOC_Dd] = {
{ NULL, pre_em, post_font, NULL, NULL }, /* Fr */
{ NULL, NULL, NULL, NULL, NULL }, /* Ud */
{ NULL, NULL, post_lb, NULL, NULL }, /* Lb */
- { NULL, pre_pp, NULL, NULL, NULL }, /* Lp */
+ { NULL, pre_abort, NULL, NULL, NULL }, /* Lp */
{ NULL, pre_lk, NULL, NULL, NULL }, /* Lk */
{ NULL, pre_em, post_font, NULL, NULL }, /* Mt */
{ cond_body, pre_enc, post_enc, "{", "}" }, /* Brq */
@@ -725,6 +726,12 @@ cond_body(DECL_ARGS)
}
static int
+pre_abort(DECL_ARGS)
+{
+ abort();
+}
+
+static int
pre_enc(DECL_ARGS)
{
const char *prefix;