-.\" $Id: mdoc.3,v 1.43 2010/06/27 15:52:41 kristaps Exp $
+.\" $Id: mdoc.3,v 1.44 2010/06/27 16:18:13 kristaps Exp $
.\"
.\" Copyright (c) 2009-2010 Kristaps Dzonsons <kristaps@bsd.lv>
.\"
.Vt extern const char * const * mdoc_argnames;
.Ft "struct mdoc *"
.Fo mdoc_alloc
-.Fa "const struct regset *regs"
+.Fa "struct regset *regs"
.Fa "void *data"
.Fa "int pflags"
.Fa "mandocmsg msgs"
.Fn parsed .
This example does not error-check nor free memory upon failure.
.Bd -literal -offset indent
+struct regset regs;
struct mdoc *mdoc;
const struct mdoc_node *node;
char *buf;
size_t len;
int line;
+bzero(®s, sizeof(struct regset));
line = 1;
-mdoc = mdoc_alloc(NULL, 0, NULL);
+mdoc = mdoc_alloc(®s, NULL, 0, NULL);
buf = NULL;
alloc_len = 0;