summaryrefslogtreecommitdiff
path: root/usr.bin/mandoc/mdoc.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2012-05-24 23:33:24 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2012-05-24 23:33:24 +0000
commit69f23bc61c36de2f09f0f566e98df6fce92c6571 (patch)
tree52c3f158d399985621c082cccb9e63856807639a /usr.bin/mandoc/mdoc.c
parentd380d0365e1897697b6f2c5757b403316938e0d7 (diff)
Support -Ios='OpenBSD 5.1' to override uname(3) as the source of the
default value for the mdoc(7) .Os macro. Needed for man.cgi on the OpenBSD website. Problem with man.cgi first noticed by deraadt@; beck@ and deraadt@ agree with the way to solve the issue.
Diffstat (limited to 'usr.bin/mandoc/mdoc.c')
-rw-r--r--usr.bin/mandoc/mdoc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/mandoc/mdoc.c b/usr.bin/mandoc/mdoc.c
index 80c1d32e919..1f812ed1042 100644
--- a/usr.bin/mandoc/mdoc.c
+++ b/usr.bin/mandoc/mdoc.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc.c,v 1.86 2011/09/30 00:13:21 schwarze Exp $ */
+/* $Id: mdoc.c,v 1.87 2012/05/24 23:33:23 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010 Ingo Schwarze <schwarze@openbsd.org>
@@ -193,13 +193,14 @@ mdoc_free(struct mdoc *mdoc)
* Allocate volatile and non-volatile parse resources.
*/
struct mdoc *
-mdoc_alloc(struct roff *roff, struct mparse *parse)
+mdoc_alloc(struct roff *roff, struct mparse *parse, char *defos)
{
struct mdoc *p;
p = mandoc_calloc(1, sizeof(struct mdoc));
p->parse = parse;
+ p->defos = defos;
p->roff = roff;
mdoc_hash_init();