diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2010-06-27 16:18:13 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2010-06-27 16:18:13 +0000 |
commit | dc95dcaff23f7235529d0b5d9866a252ca3f8c06 (patch) | |
tree | 33263f6d49184bc0c76b80cf9d91e5409c3d3e16 /mdoc_term.c | |
parent | dc649a73f967c1a61e60d2495f16d56db82eac57 (diff) | |
download | mandoc-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_term.c')
-rw-r--r-- | mdoc_term.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/mdoc_term.c b/mdoc_term.c index e4d50a70..cad6403e 100644 --- a/mdoc_term.c +++ b/mdoc_term.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_term.c,v 1.159 2010/06/27 01:26:20 schwarze Exp $ */ +/* $Id: mdoc_term.c,v 1.160 2010/06/27 16:18:13 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@bsd.lv> * @@ -1278,7 +1278,7 @@ synopsis_pre(struct termp *p, const struct mdoc_node *n) * Obviously, if we're not in a SYNOPSIS or no prior macros * exist, do nothing. */ - if (NULL == n->prev || SEC_SYNOPSIS != n->sec) + if (NULL == n->prev || ! (MDOC_SYNPRETTY & n->flags)) return; /* @@ -1543,7 +1543,7 @@ termp_fn_pre(DECL_ARGS) term_word(p, ")"); - if (SEC_SYNOPSIS == n->sec) + if (MDOC_SYNPRETTY & n->flags) term_word(p, ";"); return(0); @@ -1820,7 +1820,7 @@ termp_in_pre(DECL_ARGS) synopsis_pre(p, n); - if (SEC_SYNOPSIS == n->sec && MDOC_LINE & n->flags) { + if (MDOC_SYNPRETTY & n->flags && MDOC_LINE & n->flags) { term_fontpush(p, TERMFONT_BOLD); term_word(p, "#include"); term_word(p, "<"); @@ -1839,13 +1839,13 @@ static void termp_in_post(DECL_ARGS) { - if (SEC_SYNOPSIS == n->sec) + if (MDOC_SYNPRETTY & n->flags) term_fontpush(p, TERMFONT_BOLD); p->flags |= TERMP_NOSPACE; term_word(p, ">"); - if (SEC_SYNOPSIS == n->sec) + if (MDOC_SYNPRETTY & n->flags) term_fontpop(p); } @@ -1987,7 +1987,7 @@ termp_fo_post(DECL_ARGS) p->flags |= TERMP_NOSPACE; term_word(p, ")"); - if (SEC_SYNOPSIS == n->sec) { + if (MDOC_SYNPRETTY & n->flags) { p->flags |= TERMP_NOSPACE; term_word(p, ";"); } |