aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2010-04-06 16:27:53 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2010-04-06 16:27:53 +0000
commit2c7d8f319fcab79d83a632f37bdacf5ff71f26c1 (patch)
tree045a226b771201f7e52750c6465b6269a13d4dc5
parent0bbea1b848cacc7d35f6c63a0b8e16e37d1ae43f (diff)
downloadmandoc-2c7d8f319fcab79d83a632f37bdacf5ff71f26c1.tar.gz
mandoc-2c7d8f319fcab79d83a632f37bdacf5ff71f26c1.tar.zst
mandoc-2c7d8f319fcab79d83a632f37bdacf5ff71f26c1.zip
Allow `Bd' to accept (warn about then ignore) in-line arguments.
-rw-r--r--mdoc_term.c6
-rw-r--r--mdoc_validate.c6
2 files changed, 7 insertions, 5 deletions
diff --git a/mdoc_term.c b/mdoc_term.c
index 12e3afda..fbffb6c0 100644
--- a/mdoc_term.c
+++ b/mdoc_term.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_term.c,v 1.115 2010/04/06 11:28:17 kristaps Exp $ */
+/* $Id: mdoc_term.c,v 1.116 2010/04/06 16:27:53 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -1604,8 +1604,8 @@ termp_bd_pre(DECL_ARGS)
if (MDOC_BLOCK == n->type) {
print_bvspace(p, n, n);
return(1);
- } else if (MDOC_BODY != n->type)
- return(1);
+ } else if (MDOC_HEAD == n->type)
+ return(0);
nn = n->parent;
diff --git a/mdoc_validate.c b/mdoc_validate.c
index cd9a2429..0f28fa3c 100644
--- a/mdoc_validate.c
+++ b/mdoc_validate.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_validate.c,v 1.65 2010/04/06 11:52:25 kristaps Exp $ */
+/* $Id: mdoc_validate.c,v 1.66 2010/04/06 16:27:53 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -77,6 +77,7 @@ static int ewarn_ge1(POST_ARGS);
static int herr_eq0(POST_ARGS);
static int herr_ge1(POST_ARGS);
static int hwarn_eq1(POST_ARGS);
+static int hwarn_eq0(POST_ARGS);
static int hwarn_le1(POST_ARGS);
static int post_an(POST_ARGS);
@@ -113,7 +114,7 @@ static int pre_ss(PRE_ARGS);
static v_post posts_an[] = { post_an, NULL };
static v_post posts_at[] = { post_at, NULL };
-static v_post posts_bd[] = { herr_eq0, bwarn_ge1, NULL };
+static v_post posts_bd[] = { hwarn_eq0, bwarn_ge1, NULL };
static v_post posts_bf[] = { hwarn_le1, post_bf, NULL };
static v_post posts_bl[] = { bwarn_ge1, post_bl, NULL };
static v_post posts_bool[] = { eerr_eq1, ebool, NULL };
@@ -414,6 +415,7 @@ CHECK_HEAD_DEFN(eq0, err, err_child_eq, 0) /* herr_eq0() */
CHECK_HEAD_DEFN(le1, warn, warn_child_lt, 2) /* hwarn_le1() */
CHECK_HEAD_DEFN(ge1, err, err_child_gt, 0) /* herr_ge1() */
CHECK_HEAD_DEFN(eq1, warn, warn_child_eq, 1) /* hwarn_eq1() */
+CHECK_HEAD_DEFN(eq0, warn, warn_child_eq, 0) /* hwarn_eq0() */
static int