version 1.260, 2014/03/30 19:47:48 |
version 1.263, 2014/04/08 07:13:12 |
|
|
termp_ll_pre(DECL_ARGS) |
termp_ll_pre(DECL_ARGS) |
{ |
{ |
|
|
(*p->setwidth)(p, n->nchild ? a2width(p, n->child->string) : 0); |
term_setwidth(p, n->nchild ? n->child->string : NULL); |
return(0); |
return(0); |
} |
} |
|
|
Line 819 termp_it_pre(DECL_ARGS) |
|
Line 819 termp_it_pre(DECL_ARGS) |
|
MDOC_Bd == n->next->child->tok)) |
MDOC_Bd == n->next->child->tok)) |
break; |
break; |
|
|
p->flags |= TERMP_NOBREAK | TERMP_HANG; |
p->flags |= TERMP_NOBREAK | TERMP_BRIND | TERMP_HANG; |
p->trailspace = 1; |
p->trailspace = 1; |
break; |
break; |
case (LIST_tag): |
case (LIST_tag): |
if (MDOC_HEAD != n->type) |
if (MDOC_HEAD != n->type) |
break; |
break; |
|
|
p->flags |= TERMP_NOBREAK; |
p->flags |= TERMP_NOBREAK | TERMP_BRIND; |
p->trailspace = 2; |
p->trailspace = 2; |
|
|
if (NULL == n->next || NULL == n->next->child) |
if (NULL == n->next || NULL == n->next->child) |
Line 848 termp_it_pre(DECL_ARGS) |
|
Line 848 termp_it_pre(DECL_ARGS) |
|
case (LIST_diag): |
case (LIST_diag): |
if (MDOC_HEAD != n->type) |
if (MDOC_HEAD != n->type) |
break; |
break; |
p->flags |= TERMP_NOBREAK; |
p->flags |= TERMP_NOBREAK | TERMP_BRIND; |
p->trailspace = 1; |
p->trailspace = 1; |
break; |
break; |
default: |
default: |
Line 1002 termp_it_post(DECL_ARGS) |
|
Line 1002 termp_it_post(DECL_ARGS) |
|
* has munged them in the meanwhile. |
* has munged them in the meanwhile. |
*/ |
*/ |
|
|
p->flags &= ~TERMP_DANGLE; |
p->flags &= ~(TERMP_NOBREAK | TERMP_BRIND | |
p->flags &= ~TERMP_NOBREAK; |
TERMP_DANGLE | TERMP_HANG); |
p->flags &= ~TERMP_HANG; |
|
p->trailspace = 0; |
p->trailspace = 0; |
} |
} |
|
|
Line 1029 termp_nm_pre(DECL_ARGS) |
|
Line 1028 termp_nm_pre(DECL_ARGS) |
|
MDOC_TEXT == n->prev->child->type ? |
MDOC_TEXT == n->prev->child->type ? |
term_strlen(p, n->prev->child->string) : |
term_strlen(p, n->prev->child->string) : |
term_len(p, 5)); |
term_len(p, 5)); |
|
if (p->rmargin < p->offset) |
|
p->rmargin = p->offset; |
return(1); |
return(1); |
} |
} |
|
|
Line 1039 termp_nm_pre(DECL_ARGS) |
|
Line 1040 termp_nm_pre(DECL_ARGS) |
|
synopsis_pre(p, n->parent); |
synopsis_pre(p, n->parent); |
|
|
if (MDOC_HEAD == n->type && n->next->child) { |
if (MDOC_HEAD == n->type && n->next->child) { |
p->flags |= TERMP_NOSPACE | TERMP_NOBREAK; |
p->flags |= TERMP_NOSPACE | TERMP_NOBREAK | TERMP_BRIND; |
p->trailspace = 1; |
p->trailspace = 1; |
p->rmargin = p->offset + term_len(p, 1); |
p->rmargin = p->offset + term_len(p, 1); |
if (NULL == n->child) { |
if (NULL == n->child) { |
Line 1070 termp_nm_post(DECL_ARGS) |
|
Line 1071 termp_nm_post(DECL_ARGS) |
|
p->flags &= ~(TERMP_KEEP | TERMP_PREKEEP); |
p->flags &= ~(TERMP_KEEP | TERMP_PREKEEP); |
} else if (MDOC_HEAD == n->type && n->next->child) { |
} else if (MDOC_HEAD == n->type && n->next->child) { |
term_flushln(p); |
term_flushln(p); |
p->flags &= ~(TERMP_NOBREAK | TERMP_HANG); |
p->flags &= ~(TERMP_NOBREAK | TERMP_BRIND | TERMP_HANG); |
p->trailspace = 0; |
p->trailspace = 0; |
} else if (MDOC_BODY == n->type && n->child) |
} else if (MDOC_BODY == n->type && n->child) |
term_flushln(p); |
term_flushln(p); |
Line 1559 termp_fn_pre(DECL_ARGS) |
|
Line 1560 termp_fn_pre(DECL_ARGS) |
|
if (pretty) { |
if (pretty) { |
rmargin = p->rmargin; |
rmargin = p->rmargin; |
p->rmargin = p->offset + term_len(p, 4); |
p->rmargin = p->offset + term_len(p, 4); |
p->flags |= TERMP_NOBREAK | TERMP_HANG; |
p->flags |= TERMP_NOBREAK | TERMP_BRIND | TERMP_HANG; |
} |
} |
|
|
assert(MDOC_TEXT == n->type); |
assert(MDOC_TEXT == n->type); |
Line 1569 termp_fn_pre(DECL_ARGS) |
|
Line 1570 termp_fn_pre(DECL_ARGS) |
|
|
|
if (pretty) { |
if (pretty) { |
term_flushln(p); |
term_flushln(p); |
p->flags &= ~(TERMP_NOBREAK | TERMP_HANG); |
p->flags &= ~(TERMP_NOBREAK | TERMP_BRIND | TERMP_HANG); |
p->offset = p->rmargin; |
p->offset = p->rmargin; |
p->rmargin = rmargin; |
p->rmargin = rmargin; |
} |
} |
Line 2061 termp_fo_pre(DECL_ARGS) |
|
Line 2062 termp_fo_pre(DECL_ARGS) |
|
if (pretty) { |
if (pretty) { |
rmargin = p->rmargin; |
rmargin = p->rmargin; |
p->rmargin = p->offset + term_len(p, 4); |
p->rmargin = p->offset + term_len(p, 4); |
p->flags |= TERMP_NOBREAK | TERMP_HANG; |
p->flags |= TERMP_NOBREAK | TERMP_BRIND | |
|
TERMP_HANG; |
} |
} |
p->flags |= TERMP_NOSPACE; |
p->flags |= TERMP_NOSPACE; |
term_word(p, "("); |
term_word(p, "("); |
p->flags |= TERMP_NOSPACE; |
p->flags |= TERMP_NOSPACE; |
if (pretty) { |
if (pretty) { |
term_flushln(p); |
term_flushln(p); |
p->flags &= ~(TERMP_NOBREAK | TERMP_HANG); |
p->flags &= ~(TERMP_NOBREAK | TERMP_BRIND | |
|
TERMP_HANG); |
p->offset = p->rmargin; |
p->offset = p->rmargin; |
p->rmargin = rmargin; |
p->rmargin = rmargin; |
} |
} |