=================================================================== RCS file: /cvs/mandoc/mdoc_term.c,v retrieving revision 1.134 retrieving revision 1.138 diff -u -p -r1.134 -r1.138 --- mandoc/mdoc_term.c 2010/05/30 22:56:02 1.134 +++ mandoc/mdoc_term.c 2010/06/04 21:49:39 1.138 @@ -1,4 +1,4 @@ -/* $Id: mdoc_term.c,v 1.134 2010/05/30 22:56:02 kristaps Exp $ */ +/* $Id: mdoc_term.c,v 1.138 2010/06/04 21:49:39 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * @@ -260,6 +260,7 @@ static const struct termact termacts[MDOC_MAX] = { { termp_sp_pre, NULL }, /* br */ { termp_sp_pre, NULL }, /* sp */ { termp_under_pre, termp____post }, /* %U */ + { NULL, NULL }, /* Ta */ }; @@ -1357,12 +1358,7 @@ static void termp_fd_post(DECL_ARGS) { - if (n->sec != SEC_SYNOPSIS || ! (MDOC_LINE & n->flags)) - return; - term_newln(p); - if (n->next && MDOC_Fd != n->next->tok) - term_vspace(p); } @@ -1851,11 +1847,15 @@ static int termp_in_pre(DECL_ARGS) { - term_fontpush(p, TERMFONT_BOLD); - if (SEC_SYNOPSIS == n->sec) + if (SEC_SYNOPSIS == n->sec && MDOC_LINE & n->flags) { + term_fontpush(p, TERMFONT_BOLD); term_word(p, "#include"); + term_word(p, "<"); + } else { + term_word(p, "<"); + term_fontpush(p, TERMFONT_UNDER); + } - term_word(p, "<"); p->flags |= TERMP_NOSPACE; return(1); } @@ -1866,23 +1866,16 @@ static void 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; term_word(p, ">"); - term_fontpop(p); - if (SEC_SYNOPSIS != n->sec && ! (MDOC_LINE & n->flags)) - return; - - 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 ; 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); + if (SEC_SYNOPSIS == n->sec && MDOC_LINE & n->flags) { + term_fontpop(p); + term_newln(p); + } }