=================================================================== RCS file: /cvs/mandoc/Attic/man.3,v retrieving revision 1.20 retrieving revision 1.22 diff -u -p -r1.20 -r1.22 --- mandoc/Attic/man.3 2010/06/27 15:52:41 1.20 +++ mandoc/Attic/man.3 2010/07/07 15:04:54 1.22 @@ -1,4 +1,4 @@ -.\" $Id: man.3,v 1.20 2010/06/27 15:52:41 kristaps Exp $ +.\" $Id: man.3,v 1.22 2010/07/07 15:04:54 kristaps Exp $ .\" .\" Copyright (c) 2009-2010 Kristaps Dzonsons .\" @@ -14,7 +14,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: June 27 2010 $ +.Dd $Mdocdate: July 7 2010 $ .Dt MAN 3 .Os .Sh NAME @@ -29,12 +29,11 @@ .Nd man macro compiler library .Sh SYNOPSIS .In mandoc.h -.In regs.h .In man.h .Vt extern const char * const * man_macronames; .Ft "struct man *" .Fo man_alloc -.Fa "const struct regset *regs" +.Fa "struct regset *regs" .Fa "void *data" .Fa "int pflags" .Fa "mandocmsg msgs" @@ -291,14 +290,16 @@ on the finished parse tree with .Fn parsed . This example does not error-check nor free memory upon failure. .Bd -literal -offset indent +struct regset regs; struct man *man; struct man_node *node; char *buf; size_t len; int line; +bzero(®s, sizeof(struct regset)); line = 1; -man = man_alloc(NULL, 0, NULL); +man = man_alloc(®s, NULL, 0, NULL); buf = NULL; alloc_len = 0;