version 1.250, 2013/12/22 23:34:13 |
version 1.252, 2013/12/24 19:11:46 |
Line 313 print_mdoc_node(DECL_ARGS) |
|
Line 313 print_mdoc_node(DECL_ARGS) |
|
*/ |
*/ |
|
|
if (TERMP_KEEP & p->flags || MDOC_SYNPRETTY & n->flags) { |
if (TERMP_KEEP & p->flags || MDOC_SYNPRETTY & n->flags) { |
if (n->prev ? (n->prev->line != n->line) : |
if (n->prev ? (n->prev->lastline != n->line) : |
(n->parent && n->parent->line != n->line)) { |
(n->parent && n->parent->line != n->line)) { |
p->flags &= ~TERMP_KEEP; |
p->flags &= ~TERMP_KEEP; |
p->flags |= TERMP_PREKEEP; |
p->flags |= TERMP_PREKEEP; |
Line 1538 termp_ft_pre(DECL_ARGS) |
|
Line 1538 termp_ft_pre(DECL_ARGS) |
|
static int |
static int |
termp_fn_pre(DECL_ARGS) |
termp_fn_pre(DECL_ARGS) |
{ |
{ |
|
size_t width, rmargin = 0; |
int pretty; |
int pretty; |
|
|
pretty = MDOC_SYNPRETTY & n->flags; |
pretty = MDOC_SYNPRETTY & n->flags; |
Line 1547 termp_fn_pre(DECL_ARGS) |
|
Line 1548 termp_fn_pre(DECL_ARGS) |
|
if (NULL == (n = n->child)) |
if (NULL == (n = n->child)) |
return(0); |
return(0); |
|
|
|
if (pretty) { |
|
width = term_len(p, 4); |
|
rmargin = p->rmargin; |
|
p->rmargin = p->offset + width; |
|
p->flags |= TERMP_NOBREAK | TERMP_HANG; |
|
} |
|
|
assert(MDOC_TEXT == n->type); |
assert(MDOC_TEXT == n->type); |
term_fontpush(p, TERMFONT_BOLD); |
term_fontpush(p, TERMFONT_BOLD); |
term_word(p, n->string); |
term_word(p, n->string); |
term_fontpop(p); |
term_fontpop(p); |
|
|
|
if (pretty) { |
|
term_flushln(p); |
|
p->flags &= ~(TERMP_NOBREAK | TERMP_HANG); |
|
p->offset = p->rmargin; |
|
p->rmargin = rmargin; |
|
} |
|
|
p->flags |= TERMP_NOSPACE; |
p->flags |= TERMP_NOSPACE; |
term_word(p, "("); |
term_word(p, "("); |
p->flags |= TERMP_NOSPACE; |
p->flags |= TERMP_NOSPACE; |
Line 1574 termp_fn_pre(DECL_ARGS) |
|
Line 1589 termp_fn_pre(DECL_ARGS) |
|
if (pretty) { |
if (pretty) { |
p->flags |= TERMP_NOSPACE; |
p->flags |= TERMP_NOSPACE; |
term_word(p, ";"); |
term_word(p, ";"); |
|
term_flushln(p); |
} |
} |
|
|
return(0); |
return(0); |