diff options
-rw-r--r-- | mandoc.1 | 6 | ||||
-rw-r--r-- | mandoc.h | 1 | ||||
-rw-r--r-- | mdoc_validate.c | 7 | ||||
-rw-r--r-- | read.c | 1 |
4 files changed, 15 insertions, 0 deletions
@@ -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 @@ -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 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; @@ -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", |