summaryrefslogtreecommitdiffstats
path: root/usr.bin/mandoc/mdoc.c
diff options
context:
space:
mode:
authorschwarze <schwarze@openbsd.org>2012-05-24 23:33:23 +0000
committerschwarze <schwarze@openbsd.org>2012-05-24 23:33:23 +0000
commit353fa9ecab66599dba632aa54915bbe0fbe656ac (patch)
tree2a469278bd9e4beedad8c0a735f0950503389800 /usr.bin/mandoc/mdoc.c
parentIf _MIN > _MAX consider a WordBus resource to be invalid. Fixes a panic on (diff)
downloadwireguard-openbsd-353fa9ecab66599dba632aa54915bbe0fbe656ac.tar.xz
wireguard-openbsd-353fa9ecab66599dba632aa54915bbe0fbe656ac.zip
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();