version 1.231, 2011/06/29 15:38:09 |
version 1.234, 2011/09/19 22:36:16 |
Line 351 print_mdoc_node(DECL_ARGS) |
|
Line 351 print_mdoc_node(DECL_ARGS) |
|
p->flags |= TERMP_NOSPACE; |
p->flags |= TERMP_NOSPACE; |
break; |
break; |
case (MDOC_EQN): |
case (MDOC_EQN): |
term_word(p, n->eqn->data); |
term_eqn(p, n->eqn); |
break; |
break; |
case (MDOC_TBL): |
case (MDOC_TBL): |
term_tbl(p, n->span); |
term_tbl(p, n->span); |
Line 435 print_mdoc_foot(struct termp *p, const void *arg) |
|
Line 435 print_mdoc_foot(struct termp *p, const void *arg) |
|
|
|
p->offset = p->rmargin; |
p->offset = p->rmargin; |
p->rmargin = p->maxrmargin - term_strlen(p, m->os); |
p->rmargin = p->maxrmargin - term_strlen(p, m->os); |
p->flags |= TERMP_NOLPAD | TERMP_NOSPACE; |
p->flags |= TERMP_NOSPACE; |
|
|
term_word(p, m->date); |
term_word(p, m->date); |
term_flushln(p); |
term_flushln(p); |
Line 443 print_mdoc_foot(struct termp *p, const void *arg) |
|
Line 443 print_mdoc_foot(struct termp *p, const void *arg) |
|
p->offset = p->rmargin; |
p->offset = p->rmargin; |
p->rmargin = p->maxrmargin; |
p->rmargin = p->maxrmargin; |
p->flags &= ~TERMP_NOBREAK; |
p->flags &= ~TERMP_NOBREAK; |
p->flags |= TERMP_NOLPAD | TERMP_NOSPACE; |
p->flags |= TERMP_NOSPACE; |
|
|
term_word(p, m->os); |
term_word(p, m->os); |
term_flushln(p); |
term_flushln(p); |
Line 499 print_mdoc_head(struct termp *p, const void *arg) |
|
Line 499 print_mdoc_head(struct termp *p, const void *arg) |
|
|
|
p->offset = p->rmargin; |
p->offset = p->rmargin; |
p->rmargin = p->maxrmargin - term_strlen(p, title); |
p->rmargin = p->maxrmargin - term_strlen(p, title); |
p->flags |= TERMP_NOLPAD | TERMP_NOSPACE; |
p->flags |= TERMP_NOSPACE; |
|
|
term_word(p, buf); |
term_word(p, buf); |
term_flushln(p); |
term_flushln(p); |
Line 507 print_mdoc_head(struct termp *p, const void *arg) |
|
Line 507 print_mdoc_head(struct termp *p, const void *arg) |
|
p->offset = p->rmargin; |
p->offset = p->rmargin; |
p->rmargin = p->maxrmargin; |
p->rmargin = p->maxrmargin; |
p->flags &= ~TERMP_NOBREAK; |
p->flags &= ~TERMP_NOBREAK; |
p->flags |= TERMP_NOLPAD | TERMP_NOSPACE; |
p->flags |= TERMP_NOSPACE; |
|
|
term_word(p, title); |
term_word(p, title); |
term_flushln(p); |
term_flushln(p); |
Line 787 termp_it_pre(DECL_ARGS) |
|
Line 787 termp_it_pre(DECL_ARGS) |
|
case (LIST_hyphen): |
case (LIST_hyphen): |
if (MDOC_HEAD == n->type) |
if (MDOC_HEAD == n->type) |
p->flags |= TERMP_NOBREAK; |
p->flags |= TERMP_NOBREAK; |
else |
|
p->flags |= TERMP_NOLPAD; |
|
break; |
break; |
case (LIST_hang): |
case (LIST_hang): |
if (MDOC_HEAD == n->type) |
if (MDOC_HEAD == n->type) |
p->flags |= TERMP_NOBREAK; |
p->flags |= TERMP_NOBREAK; |
else |
else |
p->flags |= TERMP_NOLPAD; |
|
|
|
if (MDOC_HEAD != n->type) |
|
break; |
break; |
|
|
/* |
/* |
Line 807 termp_it_pre(DECL_ARGS) |
|
Line 802 termp_it_pre(DECL_ARGS) |
|
*/ |
*/ |
if (n->next->child && |
if (n->next->child && |
(MDOC_Bl == n->next->child->tok || |
(MDOC_Bl == n->next->child->tok || |
MDOC_Bd == n->next->child->tok)) { |
MDOC_Bd == n->next->child->tok)) |
p->flags &= ~TERMP_NOBREAK; |
p->flags &= ~TERMP_NOBREAK; |
p->flags &= ~TERMP_NOLPAD; |
else |
} else |
|
p->flags |= TERMP_HANG; |
p->flags |= TERMP_HANG; |
break; |
break; |
case (LIST_tag): |
case (LIST_tag): |
if (MDOC_HEAD == n->type) |
if (MDOC_HEAD == n->type) |
p->flags |= TERMP_NOBREAK | TERMP_TWOSPACE; |
p->flags |= TERMP_NOBREAK | TERMP_TWOSPACE; |
else |
|
p->flags |= TERMP_NOLPAD; |
|
|
|
if (MDOC_HEAD != n->type) |
if (MDOC_HEAD != n->type) |
break; |
break; |
Line 833 termp_it_pre(DECL_ARGS) |
|
Line 825 termp_it_pre(DECL_ARGS) |
|
else |
else |
p->flags |= TERMP_NOBREAK; |
p->flags |= TERMP_NOBREAK; |
|
|
assert(n->prev); |
|
if (MDOC_BODY == n->prev->type) |
|
p->flags |= TERMP_NOLPAD; |
|
|
|
break; |
break; |
case (LIST_diag): |
case (LIST_diag): |
if (MDOC_HEAD == n->type) |
if (MDOC_HEAD == n->type) |
Line 993 termp_it_post(DECL_ARGS) |
|
Line 981 termp_it_post(DECL_ARGS) |
|
p->flags &= ~TERMP_DANGLE; |
p->flags &= ~TERMP_DANGLE; |
p->flags &= ~TERMP_NOBREAK; |
p->flags &= ~TERMP_NOBREAK; |
p->flags &= ~TERMP_TWOSPACE; |
p->flags &= ~TERMP_TWOSPACE; |
p->flags &= ~TERMP_NOLPAD; |
|
p->flags &= ~TERMP_HANG; |
p->flags &= ~TERMP_HANG; |
} |
} |
|
|
Line 1009 termp_nm_pre(DECL_ARGS) |
|
Line 996 termp_nm_pre(DECL_ARGS) |
|
if (MDOC_BODY == n->type) { |
if (MDOC_BODY == n->type) { |
if (NULL == n->child) |
if (NULL == n->child) |
return(0); |
return(0); |
p->flags |= TERMP_NOLPAD | TERMP_NOSPACE; |
p->flags |= TERMP_NOSPACE; |
p->offset += term_len(p, 1) + |
p->offset += term_len(p, 1) + |
(NULL == n->prev->child ? term_strlen(p, m->name) : |
(NULL == n->prev->child ? term_strlen(p, m->name) : |
MDOC_TEXT == n->prev->child->type ? |
MDOC_TEXT == n->prev->child->type ? |
Line 1054 termp_nm_post(DECL_ARGS) |
|
Line 1041 termp_nm_post(DECL_ARGS) |
|
if (MDOC_HEAD == n->type && n->next->child) { |
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_HANG); |
} else if (MDOC_BODY == n->type && n->child) { |
} else if (MDOC_BODY == n->type && n->child) |
term_flushln(p); |
term_flushln(p); |
p->flags &= ~TERMP_NOLPAD; |
|
} |
|
} |
} |
|
|
|
|