aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mdoc.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2012-05-27 17:48:57 +0000
committerIngo Schwarze <schwarze@openbsd.org>2012-05-27 17:48:57 +0000
commit5924b5736a3bec0c2ef93ddbd1da733745942d59 (patch)
tree1df37aca7cb87b5dba851f42f6052cdfcb19f89b /mdoc.c
parent75264eae65dc293d4a49cd965f67b124bc6fb138 (diff)
downloadmandoc-5924b5736a3bec0c2ef93ddbd1da733745942d59.tar.gz
mandoc-5924b5736a3bec0c2ef93ddbd1da733745942d59.tar.zst
mandoc-5924b5736a3bec0c2ef93ddbd1da733745942d59.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. "Please check them in and I'll look into them later!" kristaps@
Diffstat (limited to 'mdoc.c')
-rw-r--r--mdoc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/mdoc.c b/mdoc.c
index 81a4ffc9..ee7c36dd 100644
--- a/mdoc.c
+++ b/mdoc.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc.c,v 1.196 2011/09/30 00:13:28 schwarze Exp $ */
+/* $Id: mdoc.c,v 1.197 2012/05/27 17:48:57 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010 Ingo Schwarze <schwarze@openbsd.org>
@@ -197,13 +197,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();