aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mdoc_html.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2010-06-27 16:18:13 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2010-06-27 16:18:13 +0000
commitdc95dcaff23f7235529d0b5d9866a252ca3f8c06 (patch)
tree33263f6d49184bc0c76b80cf9d91e5409c3d3e16 /mdoc_html.c
parentdc649a73f967c1a61e60d2495f16d56db82eac57 (diff)
downloadmandoc-dc95dcaff23f7235529d0b5d9866a252ca3f8c06.tar.gz
mandoc-dc95dcaff23f7235529d0b5d9866a252ca3f8c06.tar.zst
mandoc-dc95dcaff23f7235529d0b5d9866a252ca3f8c06.zip
Following clue-stick applied by schwarze@, back out const-ness of regset
passed in to libmdoc and libman. Fix mdoc.3 and man.3 EXAMPLE sections to include regset. Add MDOC_SYNPRETTY flag cueing front-end to nicely format certain values as if SEC_SYNOPSIS were the current section.
Diffstat (limited to 'mdoc_html.c')
-rw-r--r--mdoc_html.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/mdoc_html.c b/mdoc_html.c
index f13fe42f..38538cdb 100644
--- a/mdoc_html.c
+++ b/mdoc_html.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_html.c,v 1.86 2010/06/26 15:36:37 kristaps Exp $ */
+/* $Id: mdoc_html.c,v 1.87 2010/06/27 16:18:13 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -304,7 +304,7 @@ synopsis_pre(struct html *h, const struct mdoc_node *n)
struct roffsu su;
struct htmlpair tag;
- if (NULL == n->prev || SEC_SYNOPSIS != n->sec)
+ if (NULL == n->prev || ! (MDOC_SYNPRETTY & n->flags))
return;
SCALE_VS_INIT(&su, 1);
@@ -1614,7 +1614,7 @@ mdoc_fn_pre(MDOC_ARGS)
*/
#if 0
- if (SEC_SYNOPSIS == n->sec) {
+ if (MDOC_SYNPRETTY & n->flags) {
nbuf[0] = '\0';
html_idcat(nbuf, sp, BUFSIZ);
PAIR_ID_INIT(&tag[1], nbuf);
@@ -1644,7 +1644,7 @@ mdoc_fn_pre(MDOC_ARGS)
for (nn = n->child->next; nn; nn = nn->next) {
i = 1;
- if (SEC_SYNOPSIS == n->sec)
+ if (MDOC_SYNPRETTY & n->flags)
i = 2;
t = print_otag(h, TAG_SPAN, i, tag);
print_text(h, nn->string);
@@ -1654,7 +1654,7 @@ mdoc_fn_pre(MDOC_ARGS)
}
print_text(h, ")");
- if (SEC_SYNOPSIS == n->sec)
+ if (MDOC_SYNPRETTY & n->flags)
print_text(h, ";");
return(0);
@@ -1824,7 +1824,7 @@ mdoc_in_pre(MDOC_ARGS)
PAIR_CLASS_INIT(&tag[0], "includes");
print_otag(h, TAG_SPAN, 1, tag);
- if (SEC_SYNOPSIS == n->sec && MDOC_LINE & n->flags)
+ if (MDOC_SYNPRETTY & n->flags && MDOC_LINE & n->flags)
print_text(h, "#include");
print_text(h, "<");