summaryrefslogtreecommitdiffstats
path: root/mdoc.3
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2010-06-27 16:18:13 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2010-06-27 16:18:13 +0000
commit971f7ac206ac7af70e97998c7ef5b4536efda79e (patch)
tree27e88af287b96db192d82640ab03b190da3b84a2 /mdoc.3
parent093fd946278d03ba2f1e7e6e6194129e51485c58 (diff)
downloadmandoc-971f7ac206ac7af70e97998c7ef5b4536efda79e.tar.gz
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.
Diffstat (limited to 'mdoc.3')
-rw-r--r--mdoc.36
1 files changed, 4 insertions, 2 deletions
diff --git a/mdoc.3 b/mdoc.3
index d27df25a..b21c34dc 100644
--- a/mdoc.3
+++ b/mdoc.3
@@ -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(&regs, sizeof(struct regset));
line = 1;
-mdoc = mdoc_alloc(NULL, 0, NULL);
+mdoc = mdoc_alloc(&regs, NULL, 0, NULL);
buf = NULL;
alloc_len = 0;