version 1.205, 2015/10/17 00:21:07 |
version 1.208, 2016/08/20 15:58:21 |
Line 228 mdoc_endparse(struct roff_man *mdoc) |
|
Line 228 mdoc_endparse(struct roff_man *mdoc) |
|
/* Rewind to the first. */ |
/* Rewind to the first. */ |
|
|
rew_last(mdoc, mdoc->first); |
rew_last(mdoc, mdoc->first); |
|
mdoc_state_reset(mdoc); |
} |
} |
|
|
/* |
/* |
Line 262 lookup(struct roff_man *mdoc, int from, int line, int |
|
Line 263 lookup(struct roff_man *mdoc, int from, int line, int |
|
static void |
static void |
rew_last(struct roff_man *mdoc, const struct roff_node *to) |
rew_last(struct roff_man *mdoc, const struct roff_node *to) |
{ |
{ |
struct roff_node *np; |
|
|
|
if (to->flags & MDOC_VALID) |
if (to->flags & MDOC_VALID) |
return; |
return; |
|
|
while (mdoc->last != to) { |
while (mdoc->last != to) { |
/* |
mdoc_state(mdoc, mdoc->last); |
* Save the parent here, because we may delete the |
mdoc->last->flags |= MDOC_VALID | MDOC_ENDED; |
* mdoc->last node in the post-validation phase and reset |
mdoc->last = mdoc->last->parent; |
* it to mdoc->last->parent, causing a step in the closing |
|
* out to be lost. |
|
*/ |
|
np = mdoc->last->parent; |
|
mdoc_valid_post(mdoc); |
|
mdoc->last = np; |
|
assert(mdoc->last); |
|
} |
} |
|
mdoc_state(mdoc, mdoc->last); |
|
mdoc->last->flags |= MDOC_VALID | MDOC_ENDED; |
mdoc->next = ROFF_NEXT_SIBLING; |
mdoc->next = ROFF_NEXT_SIBLING; |
mdoc_valid_post(mdoc); |
|
} |
} |
|
|
/* |
/* |
Line 298 rew_pending(struct roff_man *mdoc, const struct roff_n |
|
Line 292 rew_pending(struct roff_man *mdoc, const struct roff_n |
|
case ROFFT_HEAD: |
case ROFFT_HEAD: |
roff_body_alloc(mdoc, n->line, n->pos, |
roff_body_alloc(mdoc, n->line, n->pos, |
n->tok); |
n->tok); |
return; |
break; |
case ROFFT_BLOCK: |
case ROFFT_BLOCK: |
break; |
break; |
default: |
default: |
Line 1465 phrase_ta(MACRO_PROT_ARGS) |
|
Line 1459 phrase_ta(MACRO_PROT_ARGS) |
|
continue; |
continue; |
if (n->tok == MDOC_It && n->type == ROFFT_BODY) |
if (n->tok == MDOC_It && n->type == ROFFT_BODY) |
body = n; |
body = n; |
if (n->tok == MDOC_Bl) |
if (n->tok == MDOC_Bl && n->end == ENDBODY_NOT) |
break; |
break; |
} |
} |
|
|