source@mandoc.bsd.lv
 help / color / mirror / Atom feed
* mandoc: in the base system, suggest leaving .Os blank; inspired by
@ 2017-06-24 16:00 schwarze
  0 siblings, 0 replies; only message in thread
From: schwarze @ 2017-06-24 16:00 UTC (permalink / raw)
  To: source

Log Message:
-----------
in the base system, suggest leaving .Os blank; inspired by mdoclint

Modified Files:
--------------
    mandoc:
        mandoc.1
        mandoc.h
        mdoc_validate.c
        read.c

Revision Data
-------------
Index: mandoc.h
===================================================================
RCS file: /home/cvs/mandoc/mandoc/mandoc.h,v
retrieving revision 1.233
retrieving revision 1.234
diff -Lmandoc.h -Lmandoc.h -u -p -r1.233 -r1.234
--- mandoc.h
+++ mandoc.h
@@ -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 ===== */
Index: mdoc_validate.c
===================================================================
RCS file: /home/cvs/mandoc/mandoc/mdoc_validate.c,v
retrieving revision 1.340
retrieving revision 1.341
diff -Lmdoc_validate.c -Lmdoc_validate.c -u -p -r1.340 -r1.341
--- mdoc_validate.c
+++ 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;
Index: read.c
===================================================================
RCS file: /home/cvs/mandoc/mandoc/read.c,v
retrieving revision 1.179
retrieving revision 1.180
diff -Lread.c -Lread.c -u -p -r1.179 -r1.180
--- read.c
+++ read.c
@@ -90,6 +90,7 @@ static	const char * const	mandocerrs[MAN
 
 	"Mdocdate found",
 	"Mdocdate missing",
+	"operating system explicitly specified",
 	"RCS id missing",
 
 	"generic style suggestion",
Index: mandoc.1
===================================================================
RCS file: /home/cvs/mandoc/mandoc/mandoc.1,v
retrieving revision 1.202
retrieving revision 1.203
diff -Lmandoc.1 -Lmandoc.1 -u -p -r1.202 -r1.203
--- mandoc.1
+++ mandoc.1
@@ -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
--
 To unsubscribe send an email to source+unsubscribe@mandoc.bsd.lv

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-06-24 16:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-24 16:00 mandoc: in the base system, suggest leaving .Os blank; inspired by schwarze

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).