version 1.366, 2018/12/30 00:49:55 |
version 1.368, 2018/12/31 07:46:07 |
Line 288 static const char * const secnames[SEC__MAX] = { |
|
Line 288 static const char * const secnames[SEC__MAX] = { |
|
|
|
/* Validate the subtree rooted at mdoc->last. */ |
/* Validate the subtree rooted at mdoc->last. */ |
void |
void |
mdoc_node_validate(struct roff_man *mdoc) |
mdoc_validate(struct roff_man *mdoc) |
{ |
{ |
struct roff_node *n, *np; |
struct roff_node *n, *np; |
const v_post *p; |
const v_post *p; |
Line 319 mdoc_node_validate(struct roff_man *mdoc) |
|
Line 319 mdoc_node_validate(struct roff_man *mdoc) |
|
|
|
mdoc->last = mdoc->last->child; |
mdoc->last = mdoc->last->child; |
while (mdoc->last != NULL) { |
while (mdoc->last != NULL) { |
mdoc_node_validate(mdoc); |
mdoc_validate(mdoc); |
if (mdoc->last == n) |
if (mdoc->last == n) |
mdoc->last = mdoc->last->child; |
mdoc->last = mdoc->last->child; |
else |
else |
Line 338 mdoc_node_validate(struct roff_man *mdoc) |
|
Line 338 mdoc_node_validate(struct roff_man *mdoc) |
|
check_text(mdoc, n->line, n->pos, n->string); |
check_text(mdoc, n->line, n->pos, n->string); |
if (np->tok != MDOC_Ql && np->tok != MDOC_Dl && |
if (np->tok != MDOC_Ql && np->tok != MDOC_Dl && |
(np->tok != MDOC_Bd || |
(np->tok != MDOC_Bd || |
(mdoc->flags & MDOC_LITERAL) == 0) && |
(mdoc->flags & ROFF_NOFILL) == 0) && |
(np->tok != MDOC_It || np->type != ROFFT_HEAD || |
(np->tok != MDOC_It || np->type != ROFFT_HEAD || |
np->parent->parent->norm->Bl.type != LIST_diag)) |
np->parent->parent->norm->Bl.type != LIST_diag)) |
check_text_em(mdoc, n->line, n->pos, n->string); |
check_text_em(mdoc, n->line, n->pos, n->string); |
Line 411 check_text(struct roff_man *mdoc, int ln, int pos, cha |
|
Line 411 check_text(struct roff_man *mdoc, int ln, int pos, cha |
|
{ |
{ |
char *cp; |
char *cp; |
|
|
if (MDOC_LITERAL & mdoc->flags) |
if (mdoc->flags & ROFF_NOFILL) |
return; |
return; |
|
|
for (cp = p; NULL != (p = strchr(p, '\t')); p++) |
for (cp = p; NULL != (p = strchr(p, '\t')); p++) |