aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/manpath.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2018-10-02 14:56:47 +0000
committerIngo Schwarze <schwarze@openbsd.org>2018-10-02 14:56:47 +0000
commitcc61d00ed522f99c9f1a34fcc6add2d202942885 (patch)
treebd523708468309e4a2f716485ca75294c2822d66 /manpath.c
parentdfc72caad2158b1226363fe39e7bfa995ef68f78 (diff)
downloadmandoc-cc61d00ed522f99c9f1a34fcc6add2d202942885.tar.gz
mandoc-cc61d00ed522f99c9f1a34fcc6add2d202942885.tar.zst
mandoc-cc61d00ed522f99c9f1a34fcc6add2d202942885.zip
Add an option -T html -O toc to add a brief table of contents near
the top of HTML pages containing at least two non-standard sections. Suggested by Adam Kalisz and discussed with kristaps@ during EuroBSDCon 2018.
Diffstat (limited to 'manpath.c')
-rw-r--r--manpath.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/manpath.c b/manpath.c
index 54f7a6b1..f6cf704f 100644
--- a/manpath.c
+++ b/manpath.c
@@ -1,6 +1,6 @@
-/* $Id: manpath.c,v 1.35 2017/07/01 09:47:30 schwarze Exp $ */
+/* $Id: manpath.c,v 1.36 2018/10/02 14:56:47 schwarze Exp $ */
/*
- * Copyright (c) 2011, 2014, 2015, 2017 Ingo Schwarze <schwarze@openbsd.org>
+ * Copyright (c) 2011,2014,2015,2017,2018 Ingo Schwarze <schwarze@openbsd.org>
* Copyright (c) 2011 Kristaps Dzonsons <kristaps@bsd.lv>
*
* Permission to use, copy, modify, and distribute this software for any
@@ -233,7 +233,7 @@ manconf_output(struct manoutput *conf, const char *cp, int fromfile)
{
const char *const toks[] = {
"includes", "man", "paper", "style",
- "indent", "width", "fragment", "mdoc", "noval"
+ "indent", "width", "fragment", "mdoc", "noval", "toc"
};
const char *errstr;
@@ -320,6 +320,9 @@ manconf_output(struct manoutput *conf, const char *cp, int fromfile)
case 8:
conf->noval = 1;
return 0;
+ case 9:
+ conf->toc = 1;
+ return 0;
default:
if (fromfile)
warnx("-O %s: Bad argument", cp);