version 1.365, 2018/12/14 05:18:02 |
version 1.367, 2018/12/31 04:55:47 |
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 1952 post_root(POST_ARGS) |
|
Line 1952 post_root(POST_ARGS) |
|
while (*arch != NULL && strcmp(*arch, mdoc->meta.arch)) |
while (*arch != NULL && strcmp(*arch, mdoc->meta.arch)) |
arch++; |
arch++; |
if (*arch == NULL) { |
if (*arch == NULL) { |
n = mdoc->first->child; |
n = mdoc->meta.first->child; |
while (n->tok != MDOC_Dt || |
while (n->tok != MDOC_Dt || |
n->child == NULL || |
n->child == NULL || |
n->child->next == NULL || |
n->child->next == NULL || |
Line 1968 post_root(POST_ARGS) |
|
Line 1968 post_root(POST_ARGS) |
|
|
|
/* Check that we begin with a proper `Sh'. */ |
/* Check that we begin with a proper `Sh'. */ |
|
|
n = mdoc->first->child; |
n = mdoc->meta.first->child; |
while (n != NULL && |
while (n != NULL && |
(n->type == ROFFT_COMMENT || |
(n->type == ROFFT_COMMENT || |
(n->tok >= MDOC_Dd && |
(n->tok >= MDOC_Dd && |