=================================================================== RCS file: /cvs/mandoc/mandoc.3,v retrieving revision 1.32 retrieving revision 1.35 diff -u -p -r1.32 -r1.35 --- mandoc/mandoc.3 2015/07/19 06:05:16 1.32 +++ mandoc/mandoc.3 2016/01/08 02:53:13 1.35 @@ -1,4 +1,4 @@ -.\" $Id: mandoc.3,v 1.32 2015/07/19 06:05:16 schwarze Exp $ +.\" $Id: mandoc.3,v 1.35 2016/01/08 02:53:13 schwarze Exp $ .\" .\" Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons .\" Copyright (c) 2010, 2013, 2014, 2015 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: July 19 2015 $ +.Dd $Mdocdate: January 8 2016 $ .Dt MANDOC 3 .Os .Sh NAME @@ -50,7 +50,6 @@ .Fa "int options" .Fa "enum mandoclevel wlevel" .Fa "mandocmsg mmsg" -.Fa "const struct mchars *mchars" .Fa "char *defos" .Fc .Ft void @@ -74,10 +73,9 @@ .Fo mparse_keep .Fa "struct mparse *parse" .Fc -.Ft "enum mandoclevel" +.Ft int .Fo mparse_open .Fa "struct mparse *parse" -.Fa "int *fd" .Fa "const char *fname" .Fc .Ft "enum mandoclevel" @@ -178,6 +176,9 @@ or parse it with .Fn mparse_readfd ; .It +close it with +.Xr close 2 ; +.It retrieve the syntax tree with .Fn mparse_result ; .It @@ -210,12 +211,6 @@ An error or warning message during parsing. 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 @@ -340,9 +335,6 @@ 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 @@ -395,9 +387,7 @@ does not already end in try again after appending .Ql .gz . Save the information whether the file is zipped or not. -Return a file descriptor open for reading in -.Fa fd , -or -1 on failure. +Return a file descriptor open for reading or -1 on failure. It can be passed to .Fn mparse_readfd or used directly. @@ -413,6 +403,8 @@ or Pass the associated filename in .Va fname . This function may be called multiple times with different parameters; however, +.Xr close 2 +and .Fn mparse_reset should be invoked between parses. Declared in