summaryrefslogtreecommitdiffstats
path: root/mdoc_validate.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2010-11-29 13:12:24 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2010-11-29 13:12:24 +0000
commit8e392c10f46295efafb9684415556e05d79d3873 (patch)
tree2c9bb4d2b2056798c264bd92f13c962004bd5245 /mdoc_validate.c
parentfd35a4e655cb9b33cb8c81149b87a039d2eff24b (diff)
downloadmandoc-8e392c10f46295efafb9684415556e05d79d3873.tar.gz
Clarifying role of pre_pp (now pre_par), which was confusing me due to
its name. Added some more documentation just for clarity's sake. No functional change.
Diffstat (limited to 'mdoc_validate.c')
-rw-r--r--mdoc_validate.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/mdoc_validate.c b/mdoc_validate.c
index 0fd08dc6..3a58a1f4 100644
--- a/mdoc_validate.c
+++ b/mdoc_validate.c
@@ -106,7 +106,7 @@ static int pre_display(PRE_ARGS);
static int pre_dt(PRE_ARGS);
static int pre_it(PRE_ARGS);
static int pre_os(PRE_ARGS);
-static int pre_pp(PRE_ARGS);
+static int pre_par(PRE_ARGS);
static int pre_rv(PRE_ARGS);
static int pre_sh(PRE_ARGS);
static int pre_ss(PRE_ARGS);
@@ -137,8 +137,8 @@ static v_post posts_vt[] = { post_vt, NULL };
static v_post posts_wline[] = { bwarn_ge1, herr_eq0, NULL };
static v_post posts_wtext[] = { ewarn_ge1, NULL };
static v_pre pres_an[] = { pre_an, NULL };
-static v_pre pres_bd[] = { pre_display, pre_bd, pre_pp, NULL };
-static v_pre pres_bl[] = { pre_bl, pre_pp, NULL };
+static v_pre pres_bd[] = { pre_display, pre_bd, pre_par, NULL };
+static v_pre pres_bl[] = { pre_bl, pre_par, NULL };
static v_pre pres_d1[] = { pre_display, NULL };
static v_pre pres_dd[] = { pre_dd, NULL };
static v_pre pres_dt[] = { pre_dt, NULL };
@@ -147,7 +147,7 @@ static v_pre pres_ex[] = { NULL, NULL };
static v_pre pres_fd[] = { NULL, NULL };
static v_pre pres_it[] = { pre_it, NULL };
static v_pre pres_os[] = { pre_os, NULL };
-static v_pre pres_pp[] = { pre_pp, NULL };
+static v_pre pres_pp[] = { pre_par, NULL };
static v_pre pres_rv[] = { pre_rv, NULL };
static v_pre pres_sh[] = { pre_sh, NULL };
static v_pre pres_ss[] = { pre_ss, NULL };
@@ -1622,15 +1622,17 @@ post_sh_head(POST_ARGS)
return(1);
}
-
static int
-pre_pp(PRE_ARGS)
+pre_par(PRE_ARGS)
{
if (NULL == mdoc->last)
return(1);
- /* Don't allow prior `Lp' or `Pp'. */
+ /*
+ * Don't allow prior `Lp' or `Pp' prior to a paragraph-type
+ * block: `Lp', `Pp', or non-compact `Bd' or `Bl'.
+ */
if (MDOC_Pp != mdoc->last->tok && MDOC_Lp != mdoc->last->tok)
return(1);