From: schwarze@mandoc.bsd.lv
To: source@mandoc.bsd.lv
Subject: mandoc: in the base system, suggest leaving .Os blank; inspired by
Date: Sat, 24 Jun 2017 11:00:21 -0500 (EST) [thread overview]
Message-ID: <4526055095999687628.enqueue@fantadrom.bsd.lv> (raw)
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
reply other threads:[~2017-06-24 16:00 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4526055095999687628.enqueue@fantadrom.bsd.lv \
--to=schwarze@mandoc.bsd.lv \
--cc=source@mandoc.bsd.lv \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).