version 1.42, 2010/06/26 15:36:37 |
version 1.44, 2010/06/27 16:18:13 |
|
|
.Vt extern const char * const * mdoc_macronames; |
.Vt extern const char * const * mdoc_macronames; |
.Vt extern const char * const * mdoc_argnames; |
.Vt extern const char * const * mdoc_argnames; |
.Ft "struct mdoc *" |
.Ft "struct mdoc *" |
.Fn mdoc_alloc "void *data" "int pflags" "mandocmsg msgs" |
.Fo mdoc_alloc |
|
.Fa "struct regset *regs" |
|
.Fa "void *data" |
|
.Fa "int pflags" |
|
.Fa "mandocmsg msgs" |
|
.Fc |
.Ft int |
.Ft int |
.Fn mdoc_endparse "struct mdoc *mdoc" |
.Fn mdoc_endparse "struct mdoc *mdoc" |
.Ft void |
.Ft void |
|
|
.Ft int |
.Ft int |
.Fo mdoc_parseln |
.Fo mdoc_parseln |
.Fa "struct mdoc *mdoc" |
.Fa "struct mdoc *mdoc" |
.Fa "const struct regset *regs" |
|
.Fa "int line" |
.Fa "int line" |
.Fa "char *buf" |
.Fa "char *buf" |
.Fc |
.Fc |
Line 255 on the finished parse tree with |
|
Line 259 on the finished parse tree with |
|
.Fn parsed . |
.Fn parsed . |
This example does not error-check nor free memory upon failure. |
This example does not error-check nor free memory upon failure. |
.Bd -literal -offset indent |
.Bd -literal -offset indent |
|
struct regset regs; |
struct mdoc *mdoc; |
struct mdoc *mdoc; |
const struct mdoc_node *node; |
const struct mdoc_node *node; |
char *buf; |
char *buf; |
size_t len; |
size_t len; |
int line; |
int line; |
|
|
|
bzero(®s, sizeof(struct regset)); |
line = 1; |
line = 1; |
mdoc = mdoc_alloc(NULL, 0, NULL); |
mdoc = mdoc_alloc(®s, NULL, 0, NULL); |
buf = NULL; |
buf = NULL; |
alloc_len = 0; |
alloc_len = 0; |
|
|