aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mdoc_term.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
commit820b4d56427ff6a0f1e3399ac7e4aea447dd5c20 (patch)
tree021019d37963c18cc8553ccaff918c1f9ea1441f /mdoc_term.c
parent17e67c5cb10de07302a0f0ad1a0da7af23788f98 (diff)
downloadmandoc-820b4d56427ff6a0f1e3399ac7e4aea447dd5c20.tar.gz
mandoc-820b4d56427ff6a0f1e3399ac7e4aea447dd5c20.tar.zst
mandoc-820b4d56427ff6a0f1e3399ac7e4aea447dd5c20.zip
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_term.c')
-rw-r--r--mdoc_term.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/mdoc_term.c b/mdoc_term.c
index 073cd4cb..13ed6880 100644
--- a/mdoc_term.c
+++ b/mdoc_term.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_term.c,v 1.368 2018/08/17 20:33:38 schwarze Exp $ */
+/* $Id: mdoc_term.c,v 1.369 2018/12/03 21:00:11 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010, 2012-2018 Ingo Schwarze <schwarze@openbsd.org>
@@ -84,6 +84,7 @@ static void termp_xx_post(DECL_ARGS);
static int termp__a_pre(DECL_ARGS);
static int termp__t_pre(DECL_ARGS);
+static int termp_abort_pre(DECL_ARGS);
static int termp_an_pre(DECL_ARGS);
static int termp_ap_pre(DECL_ARGS);
static int termp_bd_pre(DECL_ARGS);
@@ -159,7 +160,7 @@ static const struct mdoc_term_act mdoc_term_acts[MDOC_MAX - MDOC_Dd] = {
{ termp_nd_pre, NULL }, /* Nd */
{ termp_nm_pre, termp_nm_post }, /* Nm */
{ termp_quote_pre, termp_quote_post }, /* Op */
- { termp_ft_pre, NULL }, /* Ot */
+ { termp_abort_pre, NULL }, /* Ot */
{ termp_under_pre, NULL }, /* Pa */
{ termp_ex_pre, NULL }, /* Rv */
{ NULL, NULL }, /* St */
@@ -232,7 +233,7 @@ static const struct mdoc_term_act mdoc_term_acts[MDOC_MAX - MDOC_Dd] = {
{ termp_under_pre, NULL }, /* Fr */
{ NULL, NULL }, /* Ud */
{ NULL, termp_lb_post }, /* Lb */
- { termp_pp_pre, NULL }, /* Lp */
+ { termp_abort_pre, NULL }, /* Lp */
{ termp_lk_pre, NULL }, /* Lk */
{ termp_under_pre, NULL }, /* Mt */
{ termp_quote_pre, termp_quote_post }, /* Brq */
@@ -1493,7 +1494,6 @@ termp_bd_pre(DECL_ARGS)
case MDOC_Bl:
case MDOC_D1:
case MDOC_Dl:
- case MDOC_Lp:
case MDOC_Pp:
continue;
default:
@@ -2098,3 +2098,9 @@ termp_tag_pre(DECL_ARGS)
tag_put(n->child->string, 1, p->line);
return 1;
}
+
+static int
+termp_abort_pre(DECL_ARGS)
+{
+ abort();
+}