[BACK]Return to mandoc.3 CVS log [TXT][DIR] Up to [cvsweb.bsd.lv] / mandoc

Diff for /mandoc/mandoc.3 between version 1.37 and 1.40

version 1.37, 2016/07/07 19:19:01 version 1.40, 2017/06/24 14:38:32
Line 1 
Line 1 
 .\"     $Id$  .\"     $Id$
 .\"  .\"
 .\" Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>  .\" Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
 .\" Copyright (c) 2010-2016 Ingo Schwarze <schwarze@openbsd.org>  .\" Copyright (c) 2010-2017 Ingo Schwarze <schwarze@openbsd.org>
 .\"  .\"
 .\" Permission to use, copy, modify, and distribute this software for any  .\" Permission to use, copy, modify, and distribute this software for any
 .\" purpose with or without fee is hereby granted, provided that the above  .\" purpose with or without fee is hereby granted, provided that the above
Line 34 
Line 34 
 .Nm mparse_reset ,  .Nm mparse_reset ,
 .Nm mparse_result ,  .Nm mparse_result ,
 .Nm mparse_strerror ,  .Nm mparse_strerror ,
 .Nm mparse_strlevel  .Nm mparse_strlevel ,
   .Nm mparse_updaterc
 .Nd mandoc macro compiler library  .Nd mandoc macro compiler library
 .Sh SYNOPSIS  .Sh SYNOPSIS
 .In sys/types.h  .In sys/types.h
Line 46 
Line 47 
 .Ft struct mparse *  .Ft struct mparse *
 .Fo mparse_alloc  .Fo mparse_alloc
 .Fa "int options"  .Fa "int options"
 .Fa "enum mandoclevel wlevel"  .Fa "enum mandocerr mmin"
 .Fa "mandocmsg mmsg"  .Fa "mandocmsg mmsg"
 .Fa "char *defos"  .Fa "enum mandoc_os oe_e"
   .Fa "char *os_s"
 .Fc  .Fc
 .Ft void  .Ft void
 .Fo (*mandocmsg)  .Fo (*mandocmsg)
Line 100 
Line 102 
 .Fo mparse_strlevel  .Fo mparse_strlevel
 .Fa "enum mandoclevel"  .Fa "enum mandoclevel"
 .Fc  .Fc
   .Ft void
   .Fo mparse_updaterc
   .Fa "struct mparse *parse"
   .Fa "enum mandoclevel *rc"
   .Fc
 .In roff.h  .In roff.h
 .Ft void  .Ft void
 .Fo deroff  .Fo deroff
Line 181  or
Line 188  or
 .Fn man_validate ,  .Fn man_validate ,
 respectively;  respectively;
 .It  .It
   if information about the validity of the input is needed, fetch it with
   .Fn mparse_updaterc ;
   .It
 iterate over parse nodes with starting from the  iterate over parse nodes with starting from the
 .Fa first  .Fa first
 member of the returned  member of the returned
Line 295  This is for example useful in
Line 305  This is for example useful in
 .Xr makewhatis 8  .Xr makewhatis 8
 .Fl Q  .Fl Q
 to quickly build minimal databases.  to quickly build minimal databases.
 .It Ar wlevel  .It Ar mmin
 Can be set to  Can be set to
 .Dv MANDOCLEVEL_BADARG ,  .Dv MANDOCERR_BASE ,
 .Dv MANDOCLEVEL_ERROR ,  .Dv MANDOCERR_STYLE ,
   .Dv MANDOCERR_WARNING ,
   .Dv MANDOCERR_ERROR ,
   .Dv MANDOCERR_UNSUPP ,
 or  or
 .Dv MANDOCLEVEL_WARNING .  .Dv MANDOCERR_MAX .
 Messages below the selected level will be suppressed.  Messages below the selected level will be suppressed.
 .It Ar mmsg  .It Ar mmsg
 A callback function to handle errors and warnings.  A callback function to handle errors and warnings.
Line 310  for an example.
Line 323  for an example.
 If printing of error messages is not desired,  If printing of error messages is not desired,
 .Dv NULL  .Dv NULL
 may be passed.  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  A default string for the
 .Xr mdoc 7  .Xr mdoc 7
 .Sq \&Os  .Ic \&Os
 macro, overriding the  macro, overriding the
 .Dv OSNAME  .Dv OSNAME
 preprocessor definition and the results of  preprocessor definition and the results of
Line 416  Declared in
Line 438  Declared in
 .In mandoc.h ,  .In mandoc.h ,
 implemented in  implemented in
 .Pa read.c .  .Pa read.c .
   .It Fn mparse_updaterc
   If the highest warning or error level that occurred during the current
   .Fa parse
   is higher than
   .Pf * Fa rc ,
   update
   .Pf * Fa rc
   accordingly.
   This is useful after calling
   .Fn mdoc_validate
   or
   .Fn man_validate .
   Declared in
   .In mandoc.h ,
   implemented in
   .Pa read.c .
 .El  .El
 .Ss Variables  .Ss Variables
 .Bl -ohang  .Bl -ohang
Line 625  TEXT end
Line 663  TEXT end
 .Ed  .Ed
 .Pp  .Pp
 Here, the formatting of the  Here, the formatting of the
 .Sq \&Ao  .Ic \&Ao
 block extends from TEXT ao to TEXT ac,  block extends from TEXT ao to TEXT ac,
 while the formatting of the  while the formatting of the
 .Sq \&Bo  .Ic \&Bo
 block extends from TEXT bo to TEXT bc.  block extends from TEXT bo to TEXT bc.
 It renders as follows in  It renders as follows in
 .Fl T Ns Cm ascii  .Fl T Ns Cm ascii
Line 644  Using badly-nested blocks is
Line 682  Using badly-nested blocks is
 .Em strongly discouraged ;  .Em strongly discouraged ;
 for example, the  for example, the
 .Fl T Ns Cm html  .Fl T Ns Cm html
 and  front-end to
 .Fl T Ns Cm xhtml  
 front-ends to  
 .Xr mandoc 1  .Xr mandoc 1
 are unable to render them in any meaningful way.  is unable to render them in any meaningful way.
 Furthermore, behaviour when encountering badly-nested blocks is not  Furthermore, behaviour when encountering badly-nested blocks is not
 consistent across troff implementations, especially when using multiple  consistent across troff implementations, especially when using multiple
 levels of badly-nested blocks.  levels of badly-nested blocks.

Legend:
Removed from v.1.37  
changed lines
  Added in v.1.40

CVSweb