aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mandoc.3
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2017-06-24 14:38:32 +0000
committerIngo Schwarze <schwarze@openbsd.org>2017-06-24 14:38:32 +0000
commita70f21c0692d63a23e666b09912d21d50f61f0cb (patch)
tree1af950fd45e8960526ae05ff29dbcbce612efd50 /mandoc.3
parent5ade79f1a4ef39ab8eb8088ec66210650561d148 (diff)
downloadmandoc-a70f21c0692d63a23e666b09912d21d50f61f0cb.tar.gz
mandoc-a70f21c0692d63a23e666b09912d21d50f61f0cb.tar.zst
mandoc-a70f21c0692d63a23e666b09912d21d50f61f0cb.zip
Split -Wstyle into -Wstyle and the even lower -Wbase, and add
-Wopenbsd and -Wnetbsd to check conventions for the base system of a specific operating system. Mark operating system specific messages with "(OpenBSD)" at the end. Please use just "-Tlint" to check base system manuals (defaulting to -Wall, which is now -Wbase), but prefer "-Tlint -Wstyle" for the manuals of portable software projects you maintain that are not part of OpenBSD base, to avoid bogus recommendations about base system conventions that do not apply. Issue originally reported by semarie@, solution using an idea from tedu@, discussed with jmc@ and jca@.
Diffstat (limited to 'mandoc.3')
-rw-r--r--mandoc.337
1 files changed, 25 insertions, 12 deletions
diff --git a/mandoc.3 b/mandoc.3
index f57f9d1e..11d41e54 100644
--- a/mandoc.3
+++ b/mandoc.3
@@ -1,4 +1,4 @@
-.\" $Id: mandoc.3,v 1.39 2017/05/17 23:39:31 schwarze Exp $
+.\" $Id: mandoc.3,v 1.40 2017/06/24 14:38:32 schwarze Exp $
.\"
.\" Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
.\" Copyright (c) 2010-2017 Ingo Schwarze <schwarze@openbsd.org>
@@ -15,7 +15,7 @@
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.Dd $Mdocdate: May 17 2017 $
+.Dd $Mdocdate: June 24 2017 $
.Dt MANDOC 3
.Os
.Sh NAME
@@ -47,9 +47,10 @@
.Ft struct mparse *
.Fo mparse_alloc
.Fa "int options"
-.Fa "enum mandoclevel wlevel"
+.Fa "enum mandocerr mmin"
.Fa "mandocmsg mmsg"
-.Fa "char *defos"
+.Fa "enum mandoc_os oe_e"
+.Fa "char *os_s"
.Fc
.Ft void
.Fo (*mandocmsg)
@@ -304,12 +305,15 @@ This is for example useful in
.Xr makewhatis 8
.Fl Q
to quickly build minimal databases.
-.It Ar wlevel
+.It Ar mmin
Can be set to
-.Dv MANDOCLEVEL_BADARG ,
-.Dv MANDOCLEVEL_ERROR ,
+.Dv MANDOCERR_BASE ,
+.Dv MANDOCERR_STYLE ,
+.Dv MANDOCERR_WARNING ,
+.Dv MANDOCERR_ERROR ,
+.Dv MANDOCERR_UNSUPP ,
or
-.Dv MANDOCLEVEL_WARNING .
+.Dv MANDOCERR_MAX .
Messages below the selected level will be suppressed.
.It Ar mmsg
A callback function to handle errors and warnings.
@@ -319,10 +323,19 @@ for an example.
If printing of error messages is not desired,
.Dv NULL
may be passed.
-.It Ar defos
+.It Ar os_e
+Operating system to check base system conventions for.
+If
+.Dv MANDOC_OS_OTHER ,
+the system is automatically detected from
+.Ic \&Os ,
+.Fl Ios ,
+or
+.Xr uname 3 .
+.It Ar os_s
A default string for the
.Xr mdoc 7
-.Sq \&Os
+.Ic \&Os
macro, overriding the
.Dv OSNAME
preprocessor definition and the results of
@@ -650,10 +663,10 @@ TEXT end
.Ed
.Pp
Here, the formatting of the
-.Sq \&Ao
+.Ic \&Ao
block extends from TEXT ao to TEXT ac,
while the formatting of the
-.Sq \&Bo
+.Ic \&Bo
block extends from TEXT bo to TEXT bc.
It renders as follows in
.Fl T Ns Cm ascii