-.\" $Id: mandoc.3,v 1.39 2017/05/17 23:39:31 schwarze Exp $
+.\" $Id: mandoc.3,v 1.41 2017/07/04 23:40:01 schwarze Exp $
.\"
.\" Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
.\" Copyright (c) 2010-2017 Ingo Schwarze <schwarze@openbsd.org>
.\" 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: July 4 2017 $
.Dt MANDOC 3
.Os
.Sh NAME
.Nm mparse_result ,
.Nm mparse_strerror ,
.Nm mparse_strlevel ,
-.Nm mparse_updaterc
+.Nm mparse_updaterc
.Nd mandoc macro compiler library
.Sh SYNOPSIS
.In sys/types.h
.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)
.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.
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
.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