summaryrefslogtreecommitdiffstats
path: root/usr.bin/mandoc/cgi.c
diff options
context:
space:
mode:
authorschwarze <schwarze@openbsd.org>2018-10-02 19:40:05 +0000
committerschwarze <schwarze@openbsd.org>2018-10-02 19:40:05 +0000
commit32f0ba5fe2366927240fdc00ebf6ac349d125fa0 (patch)
tree46aa8a502bb35de3afff7ea66b3f91f3f88d111f /usr.bin/mandoc/cgi.c
parentFix potential rounding errors when calculating the qcow2 l1 and ref tables sizes (diff)
downloadwireguard-openbsd-32f0ba5fe2366927240fdc00ebf6ac349d125fa0.tar.xz
wireguard-openbsd-32f0ba5fe2366927240fdc00ebf6ac349d125fa0.zip
enable the equivalent of -O toc in man.cgi(8)
Diffstat (limited to 'usr.bin/mandoc/cgi.c')
-rw-r--r--usr.bin/mandoc/cgi.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/mandoc/cgi.c b/usr.bin/mandoc/cgi.c
index d967c6d6c96..847ea343ae1 100644
--- a/usr.bin/mandoc/cgi.c
+++ b/usr.bin/mandoc/cgi.c
@@ -1,7 +1,7 @@
-/* $OpenBSD: cgi.c,v 1.97 2018/10/01 08:05:25 schwarze Exp $ */
+/* $OpenBSD: cgi.c,v 1.98 2018/10/02 19:40:05 schwarze Exp $ */
/*
* Copyright (c) 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv>
- * Copyright (c) 2014, 2015, 2016, 2017 Ingo Schwarze <schwarze@usta.de>
+ * Copyright (c) 2014, 2015, 2016, 2017, 2018 Ingo Schwarze <schwarze@usta.de>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -863,6 +863,7 @@ resp_format(const struct req *req, const char *file)
memset(&conf, 0, sizeof(conf));
conf.fragment = 1;
conf.style = mandoc_strdup(CSS_DIR "/mandoc.css");
+ conf.toc = 1;
usepath = strcmp(req->q.manpath, req->p[0]);
mandoc_asprintf(&conf.man, "/%s%s%s%s%%N.%%S",
scriptname, *scriptname == '\0' ? "" : "/",