version 1.135, 2010/05/31 10:28:04 |
version 1.140, 2010/06/04 22:26:13 |
|
|
termp_fd_post(DECL_ARGS) |
termp_fd_post(DECL_ARGS) |
{ |
{ |
|
|
if (n->sec != SEC_SYNOPSIS || ! (MDOC_LINE & n->flags)) |
|
return; |
|
|
|
term_newln(p); |
term_newln(p); |
if (n->next && MDOC_Fd != n->next->tok) |
|
term_vspace(p); |
|
} |
} |
|
|
|
|
Line 1541 termp_fn_pre(DECL_ARGS) |
|
Line 1536 termp_fn_pre(DECL_ARGS) |
|
{ |
{ |
const struct mdoc_node *nn; |
const struct mdoc_node *nn; |
|
|
|
/* NB: MDOC_LINE has no effect on this macro! */ |
|
if (SEC_SYNOPSIS == n->sec) { |
|
if (n->prev && MDOC_Ft == n->prev->tok) |
|
term_newln(p); |
|
else if (n->prev) |
|
term_vspace(p); |
|
} |
|
|
term_fontpush(p, TERMFONT_BOLD); |
term_fontpush(p, TERMFONT_BOLD); |
term_word(p, n->child->string); |
term_word(p, n->child->string); |
term_fontpop(p); |
term_fontpop(p); |
|
|
termp_fn_post(DECL_ARGS) |
termp_fn_post(DECL_ARGS) |
{ |
{ |
|
|
if (n->sec == SEC_SYNOPSIS && n->next && MDOC_LINE & n->flags) |
/* NB: MDOC_LINE has no effect on this macro! */ |
term_vspace(p); |
if (SEC_SYNOPSIS == n->sec) |
|
term_newln(p); |
} |
} |
|
|
|
|
|
|
termp_in_pre(DECL_ARGS) |
termp_in_pre(DECL_ARGS) |
{ |
{ |
|
|
term_fontpush(p, TERMFONT_BOLD); |
if (SEC_SYNOPSIS == n->sec && MDOC_LINE & n->flags) { |
if (SEC_SYNOPSIS == n->sec) |
term_fontpush(p, TERMFONT_BOLD); |
term_word(p, "#include"); |
term_word(p, "#include"); |
|
term_word(p, "<"); |
|
} else { |
|
term_word(p, "<"); |
|
term_fontpush(p, TERMFONT_UNDER); |
|
} |
|
|
term_word(p, "<"); |
|
p->flags |= TERMP_NOSPACE; |
p->flags |= TERMP_NOSPACE; |
return(1); |
return(1); |
} |
} |
|
|
termp_in_post(DECL_ARGS) |
termp_in_post(DECL_ARGS) |
{ |
{ |
|
|
term_fontpush(p, TERMFONT_BOLD); |
if (SEC_SYNOPSIS == n->sec && MDOC_LINE & n->flags) |
|
term_fontpush(p, TERMFONT_BOLD); |
|
|
p->flags |= TERMP_NOSPACE; |
p->flags |= TERMP_NOSPACE; |
term_word(p, ">"); |
term_word(p, ">"); |
term_fontpop(p); |
|
|
|
if (SEC_SYNOPSIS != n->sec && ! (MDOC_LINE & n->flags)) |
if (SEC_SYNOPSIS == n->sec && MDOC_LINE & n->flags) { |
return; |
term_fontpop(p); |
|
term_newln(p); |
term_newln(p); |
} |
/* |
|
* XXX Not entirely correct. If `.In foo bar' is specified in |
|
* the SYNOPSIS section, then it produces a single break after |
|
* the <foo>; mandoc asserts a vertical space. Since this |
|
* construction is rarely used, I think it's fine. |
|
*/ |
|
if (n->next && MDOC_In != n->next->tok) |
|
term_vspace(p); |
|
} |
} |
|
|
|
|