=================================================================== RCS file: /cvs/mandoc/mandoc.3,v retrieving revision 1.26 retrieving revision 1.28 diff -u -p -r1.26 -r1.28 --- mandoc/mandoc.3 2014/09/03 23:21:47 1.26 +++ mandoc/mandoc.3 2014/11/26 21:40:17 1.28 @@ -1,4 +1,4 @@ -.\" $Id: mandoc.3,v 1.26 2014/09/03 23:21:47 schwarze Exp $ +.\" $Id: mandoc.3,v 1.28 2014/11/26 21:40:17 schwarze Exp $ .\" .\" Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons .\" Copyright (c) 2010 Ingo Schwarze @@ -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: September 3 2014 $ +.Dd $Mdocdate: November 26 2014 $ .Dt MANDOC 3 .Os .Sh NAME @@ -52,6 +52,7 @@ .Fa "int options" .Fa "enum mandoclevel wlevel" .Fa "mandocmsg mmsg" +.Fa "const struct mchars *mchars" .Fa "char *defos" .Fc .Ft void @@ -80,7 +81,6 @@ .Fa "struct mparse *parse" .Fa "int *fd" .Fa "const char *fname" -.Fa "pid_t *child_pid" .Fc .Ft "enum mandoclevel" .Fo mparse_readfd @@ -110,7 +110,6 @@ .Ft "enum mandoclevel" .Fo mparse_wait .Fa "struct mparse *parse" -.Fa "pid_t child_pid" .Fc .In sys/types.h .In mandoc.h @@ -173,6 +172,8 @@ The following describes a general parse sequence: .Bl -enum .It initiate a parsing sequence with +.Xr mchars_alloc 3 +and .Fn mparse_alloc ; .It parse files or file descriptors with @@ -187,7 +188,9 @@ or .Fn man_node ; .It free all allocated memory with -.Fn mparse_free , +.Fn mparse_free +and +.Xr mchars_free 3 , or invoke .Fn mparse_reset and parse new files. @@ -208,6 +211,12 @@ A fatal error, error, or warning message during parsin A classification of an .Vt "enum mandocerr" as regards system operation. +.It Vt "struct mchars" +An opaque pointer to a a character table. +Created with +.Xr mchars_alloc 3 +and freed with +.Xr mchars_free 3 . .It Vt "struct mparse" An opaque pointer to a running parse sequence. Created with @@ -332,6 +341,9 @@ A callback function to handle errors and warnings. See .Pa main.c for an example. +.It Ar mchars +An opaque pointer to a a character table obtained from +.Xr mchars_alloc 3 . .It Ar defos A default string for the .Xr mdoc 7 @@ -390,14 +402,6 @@ or -1 on failure. It can be passed to .Fn mparse_readfd or used directly. -If applicable, return the -.Xr gunzip 1 -child process ID in -.Fa child_pid , -or otherwise 0. -If non-zero, it should be passed to -.Fn mparse_wait -after completing the parse sequence. Declared in .In mandoc.h , implemented in