=================================================================== RCS file: /cvs/mandoc/mdoc_term.c,v retrieving revision 1.245 retrieving revision 1.249 diff -u -p -r1.245 -r1.249 --- mandoc/mdoc_term.c 2012/11/17 00:26:33 1.245 +++ mandoc/mdoc_term.c 2013/06/02 18:16:57 1.249 @@ -1,4 +1,4 @@ -/* $Id: mdoc_term.c,v 1.245 2012/11/17 00:26:33 schwarze Exp $ */ +/* $Id: mdoc_term.c,v 1.249 2013/06/02 18:16:57 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2010, 2012 Ingo Schwarze @@ -313,14 +313,10 @@ print_mdoc_node(DECL_ARGS) */ if (TERMP_KEEP & p->flags || MDOC_SYNPRETTY & n->flags) { - if (n->prev && n->prev->line != n->line) { + if (n->prev ? (n->prev->line != n->line) : + (n->parent && n->parent->line != n->line)) { p->flags &= ~TERMP_KEEP; p->flags |= TERMP_PREKEEP; - } else if (NULL == n->prev) { - if (n->parent && n->parent->line != n->line) { - p->flags &= ~TERMP_KEEP; - p->flags |= TERMP_PREKEEP; - } } } @@ -1756,7 +1752,8 @@ termp_xx_pre(DECL_ARGS) pp = "UNIX"; break; default: - break; + abort(); + /* NOTREACHED */ } term_word(p, pp); @@ -1928,7 +1925,7 @@ termp_quote_pre(DECL_ARGS) case (MDOC_Do): /* FALLTHROUGH */ case (MDOC_Dq): - term_word(p, "``"); + term_word(p, "\\(lq"); break; case (MDOC_Eo): break; @@ -1949,7 +1946,7 @@ termp_quote_pre(DECL_ARGS) case (MDOC_So): /* FALLTHROUGH */ case (MDOC_Sq): - term_word(p, "`"); + term_word(p, "\\(oq"); break; default: abort(); @@ -1994,7 +1991,7 @@ termp_quote_post(DECL_ARGS) case (MDOC_Do): /* FALLTHROUGH */ case (MDOC_Dq): - term_word(p, "''"); + term_word(p, "\\(rq"); break; case (MDOC_Eo): break; @@ -2015,7 +2012,7 @@ termp_quote_post(DECL_ARGS) case (MDOC_So): /* FALLTHROUGH */ case (MDOC_Sq): - term_word(p, "'"); + term_word(p, "\\(cq"); break; default: abort(); @@ -2214,7 +2211,7 @@ static void termp_bk_post(DECL_ARGS) { - if (MDOC_BODY == n->type) + if (MDOC_BODY == n->type && ! (MDOC_SYNPRETTY & n->flags)) p->flags &= ~(TERMP_KEEP | TERMP_PREKEEP); }