From dc95dcaff23f7235529d0b5d9866a252ca3f8c06 Mon Sep 17 00:00:00 2001 From: Kristaps Dzonsons Date: Sun, 27 Jun 2010 16:18:13 +0000 Subject: Following clue-stick applied by schwarze@, back out const-ness of regset passed in to libmdoc and libman. Fix mdoc.3 and man.3 EXAMPLE sections to include regset. Add MDOC_SYNPRETTY flag cueing front-end to nicely format certain values as if SEC_SYNOPSIS were the current section. --- mdoc.3 | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'mdoc.3') diff --git a/mdoc.3 b/mdoc.3 index 17d41fef..8b15b998 100644 --- a/mdoc.3 +++ b/mdoc.3 @@ -1,4 +1,4 @@ -.\" $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 .\" @@ -35,7 +35,7 @@ .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" @@ -259,14 +259,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 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; -- cgit v1.2.3-56-ge451