From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from localhost (fantadrom.bsd.lv [local]) by fantadrom.bsd.lv (OpenSMTPD) with ESMTPA id 7b053ab9 for ; Sat, 24 Jun 2017 11:00:21 -0500 (EST) Date: Sat, 24 Jun 2017 11:00:21 -0500 (EST) Message-Id: <4526055095999687628.enqueue@fantadrom.bsd.lv> X-Mailinglist: mandoc-source Reply-To: source@mandoc.bsd.lv MIME-Version: 1.0 From: schwarze@mandoc.bsd.lv To: source@mandoc.bsd.lv Subject: mandoc: in the base system, suggest leaving .Os blank; inspired by X-Mailer: activitymail 1.26, http://search.cpan.org/dist/activitymail/ Content-Type: text/plain; charset=utf-8 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