aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--mandoc.18
-rw-r--r--mandoc.h3
-rw-r--r--mdoc_validate.c9
-rw-r--r--read.c3
4 files changed, 19 insertions, 4 deletions
diff --git a/mandoc.1 b/mandoc.1
index 8bf0c6c3..063723c3 100644
--- a/mandoc.1
+++ b/mandoc.1
@@ -1,4 +1,4 @@
-.\" $Id: mandoc.1,v 1.202 2017/06/24 14:38:32 schwarze Exp $
+.\" $Id: mandoc.1,v 1.203 2017/06/24 15:59:50 schwarze Exp $
.\"
.\" Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
.\" Copyright (c) 2012, 2014-2017 Ingo Schwarze <schwarze@openbsd.org>
@@ -816,6 +816,12 @@ macro does not use CVS
keyword substitution, but using it is conventionally expected in the
.Ox
base system.
+.It Sy "operating system explicitly specified"
+.Pq mdoc , Ox , Nx
+The
+.Ic \&Os
+macro has an argument.
+In the base system, it is conventionally left blank.
.It Sy "RCS id missing"
.Pq Ox , Nx
The manual page lacks the comment line with the RCS identifier
diff --git a/mandoc.h b/mandoc.h
index aea9bcf4..db14dbf6 100644
--- a/mandoc.h
+++ b/mandoc.h
@@ -1,4 +1,4 @@
-/* $Id: mandoc.h,v 1.233 2017/06/24 14:38:32 schwarze Exp $ */
+/* $Id: mandoc.h,v 1.234 2017/06/24 15:59:50 schwarze Exp $ */
/*
* Copyright (c) 2010, 2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010-2017 Ingo Schwarze <schwarze@openbsd.org>
@@ -48,6 +48,7 @@ enum mandocerr {
MANDOCERR_MDOCDATE, /* Mdocdate found: Dd ... */
MANDOCERR_MDOCDATE_MISSING, /* Mdocdate missing: Dd ... */
+ MANDOCERR_OS_ARG, /* operating system explicitly specified: Os ... */
MANDOCERR_RCS_MISSING, /* RCS id missing */
MANDOCERR_STYLE, /* ===== start of style suggestions ===== */
diff --git a/mdoc_validate.c b/mdoc_validate.c
index 67f1525f..fd45d763 100644
--- a/mdoc_validate.c
+++ b/mdoc_validate.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_validate.c,v 1.340 2017/06/24 14:38:33 schwarze Exp $ */
+/* $Id: mdoc_validate.c,v 1.341 2017/06/24 15:59:50 schwarze Exp $ */
/*
* Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010-2017 Ingo Schwarze <schwarze@openbsd.org>
@@ -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;
diff --git a/read.c b/read.c
index 86416f70..2bc6b844 100644
--- a/read.c
+++ b/read.c
@@ -1,4 +1,4 @@
-/* $Id: read.c,v 1.179 2017/06/24 14:38:33 schwarze Exp $ */
+/* $Id: read.c,v 1.180 2017/06/24 15:59:50 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010-2017 Ingo Schwarze <schwarze@openbsd.org>
@@ -90,6 +90,7 @@ static const char * const mandocerrs[MANDOCERR_MAX] = {
"Mdocdate found",
"Mdocdate missing",
+ "operating system explicitly specified",
"RCS id missing",
"generic style suggestion",