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

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

version 1.40, 2017/06/24 14:38:32 version 1.43, 2018/12/14 01:18:25
Line 21 
Line 21 
 .Sh NAME  .Sh NAME
 .Nm mandoc ,  .Nm mandoc ,
 .Nm deroff ,  .Nm deroff ,
 .Nm mandocmsg ,  
 .Nm man_mparse ,  
 .Nm man_validate ,  .Nm man_validate ,
 .Nm mdoc_validate ,  .Nm mdoc_validate ,
 .Nm mparse_alloc ,  .Nm mparse_alloc ,
   .Nm mparse_copy ,
 .Nm mparse_free ,  .Nm mparse_free ,
 .Nm mparse_getkeep ,  
 .Nm mparse_keep ,  
 .Nm mparse_open ,  .Nm mparse_open ,
 .Nm mparse_readfd ,  .Nm mparse_readfd ,
 .Nm mparse_reset ,  .Nm mparse_reset ,
 .Nm mparse_result ,  .Nm mparse_result
 .Nm mparse_strerror ,  
 .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
   .In stdio.h
 .In mandoc.h  .In mandoc.h
 .Pp  .Pp
 .Fd "#define ASCII_NBRSP"  .Fd "#define ASCII_NBRSP"
Line 47 
Line 42 
 .Ft struct mparse *  .Ft struct mparse *
 .Fo mparse_alloc  .Fo mparse_alloc
 .Fa "int options"  .Fa "int options"
 .Fa "enum mandocerr mmin"  
 .Fa "mandocmsg mmsg"  
 .Fa "enum mandoc_os oe_e"  .Fa "enum mandoc_os oe_e"
 .Fa "char *os_s"  .Fa "char *os_s"
 .Fc  .Fc
 .Ft void  .Ft void
 .Fo (*mandocmsg)  
 .Fa "enum mandocerr errtype"  
 .Fa "enum mandoclevel level"  
 .Fa "const char *file"  
 .Fa "int line"  
 .Fa "int col"  
 .Fa "const char *msg"  
 .Fc  
 .Ft void  
 .Fo mparse_free  .Fo mparse_free
 .Fa "struct mparse *parse"  .Fa "struct mparse *parse"
 .Fc  .Fc
 .Ft const char *  .Ft void
 .Fo mparse_getkeep  .Fo mparse_copy
 .Fa "const struct mparse *parse"  .Fa "const struct mparse *parse"
 .Fc  .Fc
 .Ft void  
 .Fo mparse_keep  
 .Fa "struct mparse *parse"  
 .Fc  
 .Ft int  .Ft int
 .Fo mparse_open  .Fo mparse_open
 .Fa "struct mparse *parse"  .Fa "struct mparse *parse"
 .Fa "const char *fname"  .Fa "const char *fname"
 .Fc  .Fc
 .Ft "enum mandoclevel"  .Ft void
 .Fo mparse_readfd  .Fo mparse_readfd
 .Fa "struct mparse *parse"  .Fa "struct mparse *parse"
 .Fa "int fd"  .Fa "int fd"
Line 94 
Line 74 
 .Fa "struct roff_man **man"  .Fa "struct roff_man **man"
 .Fa "char **sodest"  .Fa "char **sodest"
 .Fc  .Fc
 .Ft "const char *"  
 .Fo mparse_strerror  
 .Fa "enum mandocerr"  
 .Fc  
 .Ft "const char *"  
 .Fo mparse_strlevel  
 .Fa "enum mandoclevel"  
 .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 126 
Line 93 
 .In mandoc.h  .In mandoc.h
 .In man.h  .In man.h
 .Vt extern const char * const * man_macronames;  .Vt extern const char * const * man_macronames;
 .Ft "const struct mparse *"  
 .Fo man_mparse  
 .Fa "const struct roff_man *man"  
 .Fc  
 .Ft void  .Ft void
 .Fo man_validate  .Fo man_validate
 .Fa "struct roff_man *man"  .Fa "struct roff_man *man"
Line 232  and freed with
Line 195  and freed with
 This may be used across parsed input if  This may be used across parsed input if
 .Fn mparse_reset  .Fn mparse_reset
 is called between parses.  is called between parses.
 .It Vt "mandocmsg"  
 A prototype for a function to handle error and warning  
 messages emitted by the parser.  
 .El  .El
 .Ss Functions  .Ss Functions
 .Bl -ohang  .Bl -ohang
Line 250  When it is no longer needed, the pointer returned from
Line 210  When it is no longer needed, the pointer returned from
 .Fn deroff  .Fn deroff
 can be passed to  can be passed to
 .Xr free 3 .  .Xr free 3 .
 .It Fn man_mparse  
 Get the parser used for the current output.  
 Declared in  
 .In man.h ,  
 implemented in  
 .Pa man.c .  
 .It Fn man_validate  .It Fn man_validate
 Validate the  Validate the
 .Dv MACROSET_MAN  .Dv MACROSET_MAN
Line 305  This is for example useful in
Line 259  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 mmin  
 Can be set to  
 .Dv MANDOCERR_BASE ,  
 .Dv MANDOCERR_STYLE ,  
 .Dv MANDOCERR_WARNING ,  
 .Dv MANDOCERR_ERROR ,  
 .Dv MANDOCERR_UNSUPP ,  
 or  
 .Dv MANDOCERR_MAX .  
 Messages below the selected level will be suppressed.  
 .It Ar mmsg  
 A callback function to handle errors and warnings.  
 See  
 .Pa main.c  
 for an example.  
 If printing of error messages is not desired,  
 .Dv NULL  
 may be passed.  
 .It Ar os_e  .It Ar os_e
 Operating system to check base system conventions for.  Operating system to check base system conventions for.
 If  If
Line 361  Declared in
Line 297  Declared in
 .In mandoc.h ,  .In mandoc.h ,
 implemented in  implemented in
 .Pa read.c .  .Pa read.c .
 .It Fn mparse_getkeep  .It Fn mparse_copy
 Acquire the keep buffer.  Dump a copy of the input to the standard output; used for
 Must follow a call of  .Fl man T Ns Cm man .
 .Fn mparse_keep .  
 Declared in  Declared in
 .In mandoc.h ,  .In mandoc.h ,
 implemented in  implemented in
 .Pa read.c .  .Pa read.c .
 .It Fn mparse_keep  
 Instruct the parser to retain a copy of its parsed input.  
 This can be acquired with subsequent  
 .Fn mparse_getkeep  
 calls.  
 Declared in  
 .In mandoc.h ,  
 implemented in  
 .Pa read.c .  
 .It Fn mparse_open  .It Fn mparse_open
 Open the file for reading.  Open the file for reading.
 If that fails and  If that fails and
Line 422  implemented in
Line 348  implemented in
 .It Fn mparse_result  .It Fn mparse_result
 Obtain the result of a parse.  Obtain the result of a parse.
 One of the two pointers will be filled in.  One of the two pointers will be filled in.
 Declared in  
 .In mandoc.h ,  
 implemented in  
 .Pa read.c .  
 .It Fn mparse_strerror  
 Return a statically-allocated string representation of an error code.  
 Declared in  
 .In mandoc.h ,  
 implemented in  
 .Pa read.c .  
 .It Fn mparse_strlevel  
 Return a statically-allocated string representation of a level code.  
 Declared in  
 .In mandoc.h ,  
 implemented in  
 .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  Declared in
 .In mandoc.h ,  .In mandoc.h ,
 implemented in  implemented in

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

CVSweb