summaryrefslogtreecommitdiff
path: root/usr.bin/mandoc/mdoc_validate.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/mandoc/mdoc_validate.c')
-rw-r--r--usr.bin/mandoc/mdoc_validate.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/usr.bin/mandoc/mdoc_validate.c b/usr.bin/mandoc/mdoc_validate.c
index 7c7a0d046b8..5f61829cb60 100644
--- a/usr.bin/mandoc/mdoc_validate.c
+++ b/usr.bin/mandoc/mdoc_validate.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_validate.c,v 1.87 2011/01/30 18:28:01 schwarze Exp $ */
+/* $Id: mdoc_validate.c,v 1.88 2011/02/06 17:33:21 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -99,6 +99,7 @@ static int post_eoln(POST_ARGS);
static int post_it(POST_ARGS);
static int post_lb(POST_ARGS);
static int post_nm(POST_ARGS);
+static int post_ns(POST_ARGS);
static int post_os(POST_ARGS);
static int post_ignpar(POST_ARGS);
static int post_prol(POST_ARGS);
@@ -143,6 +144,7 @@ static v_post posts_lb[] = { post_lb, NULL };
static v_post posts_nd[] = { berr_ge1, NULL };
static v_post posts_nm[] = { post_nm, NULL };
static v_post posts_notext[] = { ewarn_eq0, NULL };
+static v_post posts_ns[] = { post_ns, NULL };
static v_post posts_os[] = { post_os, post_prol, NULL };
static v_post posts_rs[] = { post_rs, NULL };
static v_post posts_sh[] = { post_ignpar, hwarn_ge1, bwarn_ge1, post_sh, NULL };
@@ -244,7 +246,7 @@ const struct valids mdoc_valids[MDOC_MAX] = {
{ NULL, NULL }, /* Fx */
{ NULL, NULL }, /* Ms */
{ NULL, posts_notext }, /* No */
- { NULL, posts_notext }, /* Ns */
+ { NULL, posts_ns }, /* Ns */
{ NULL, NULL }, /* Nx */
{ NULL, NULL }, /* Ox */
{ NULL, NULL }, /* Pc */
@@ -1739,6 +1741,15 @@ post_rs(POST_ARGS)
}
static int
+post_ns(POST_ARGS)
+{
+
+ if (MDOC_LINE & mdoc->last->flags)
+ mdoc_nmsg(mdoc, mdoc->last, MANDOCERR_IGNNS);
+ return(1);
+}
+
+static int
post_sh(POST_ARGS)
{