summaryrefslogtreecommitdiffstats
path: root/mdoc_validate.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2009-07-12 20:50:08 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2009-07-12 20:50:08 +0000
commitc13cf29fb280ec0bdd7e124d786f95c82f3e2c71 (patch)
tree13b84acd5935bc9ef1ec19bc12454c9e5f8a3d04 /mdoc_validate.c
parentf73e57538b043ce8b2e27e9f5acc7d95ea3e332f (diff)
downloadmandoc-c13cf29fb280ec0bdd7e124d786f95c82f3e2c71.tar.gz
Replacement of `Lb' in mdoc_action.c.
Added warning against bogus `Lb' (like groff does). Added proper quotes around `Lb' in mdoc_term.c. Moved mdoc_a2lib -> libmdoc (where it belongs).
Diffstat (limited to 'mdoc_validate.c')
-rw-r--r--mdoc_validate.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/mdoc_validate.c b/mdoc_validate.c
index 8ac9ba24..9202df65 100644
--- a/mdoc_validate.c
+++ b/mdoc_validate.c
@@ -90,6 +90,7 @@ static int berr_ge1(POST_ARGS);
static int hwarn_eq1(POST_ARGS);
static int ewarn_ge1(POST_ARGS);
static int ebool(POST_ARGS);
+
static int post_an(POST_ARGS);
static int post_args(POST_ARGS);
static int post_at(POST_ARGS);
@@ -97,6 +98,7 @@ static int post_bf(POST_ARGS);
static int post_bl(POST_ARGS);
static int post_bl_head(POST_ARGS);
static int post_it(POST_ARGS);
+static int post_lb(POST_ARGS);
static int post_nm(POST_ARGS);
static int post_root(POST_ARGS);
static int post_sh(POST_ARGS);
@@ -133,7 +135,7 @@ static v_post posts_in[] = { eerr_eq1, NULL };
static v_post posts_ss[] = { herr_ge1, NULL };
static v_post posts_nd[] = { berr_ge1, NULL };
static v_post posts_pf[] = { eerr_eq1, NULL };
-static v_post posts_lb[] = { eerr_eq1, NULL };
+static v_post posts_lb[] = { eerr_eq1, post_lb, NULL };
static v_post posts_st[] = { eerr_eq1, post_st, NULL };
static v_post posts_pp[] = { ewarn_eq0, NULL };
static v_post posts_ex[] = { eerr_eq0, post_args, NULL };
@@ -875,6 +877,16 @@ post_bf(POST_ARGS)
static int
+post_lb(POST_ARGS)
+{
+
+ if (mdoc_a2lib(mdoc->last->child->string))
+ return(1);
+ return(mdoc_nwarn(mdoc, mdoc->last, ELIB));
+}
+
+
+static int
post_nm(POST_ARGS)
{