summaryrefslogtreecommitdiffstats
path: root/mdoc_validate.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2017-06-24 15:59:50 +0000
committerIngo Schwarze <schwarze@openbsd.org>2017-06-24 15:59:50 +0000
commit0b89278a4977fe96cec8e2c06f4627e2e6b5c20f (patch)
treee22ec96df0f4796551f3388fefa635537c13371e /mdoc_validate.c
parent07569d42d40c11c0305c5b07d2c1bbb04047c52f (diff)
downloadmandoc-0b89278a4977fe96cec8e2c06f4627e2e6b5c20f.tar.gz
in the base system, suggest leaving .Os blank; inspired by mdoclint
Diffstat (limited to 'mdoc_validate.c')
-rw-r--r--mdoc_validate.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/mdoc_validate.c b/mdoc_validate.c
index 731b63c6..3f5387f4 100644
--- a/mdoc_validate.c
+++ b/mdoc_validate.c
@@ -2584,6 +2584,13 @@ out:
* the operating system earlier.
*/
+ if (n->child != NULL)
+ mandoc_vmsg(MANDOCERR_OS_ARG, mdoc->parse,
+ n->child->line, n->child->pos,
+ "Os %s (%s)", n->child->string,
+ mdoc->meta.os_e == MANDOC_OS_OPENBSD ?
+ "OpenBSD" : "NetBSD");
+
while (n->tok != MDOC_Dd)
if ((n = n->prev) == NULL)
return;