version 1.194, 2015/04/21 16:14:25 |
version 1.200, 2015/05/01 16:58:33 |
Line 210 const struct mdoc_macro * const mdoc_macros = __mdoc_m |
|
Line 210 const struct mdoc_macro * const mdoc_macros = __mdoc_m |
|
* are errors. |
* are errors. |
*/ |
*/ |
void |
void |
mdoc_macroend(struct roff_man *mdoc) |
mdoc_endparse(struct roff_man *mdoc) |
{ |
{ |
struct roff_node *n; |
struct roff_node *n; |
|
|
Line 258 lookup(struct roff_man *mdoc, int from, int line, int |
|
Line 258 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 *n, *np; |
struct roff_node *np; |
|
|
if (to->flags & MDOC_VALID) |
if (to->flags & MDOC_VALID) |
return; |
return; |
|
|
mdoc->next = ROFF_NEXT_SIBLING; |
|
while (mdoc->last != to) { |
while (mdoc->last != to) { |
/* |
/* |
* Save the parent here, because we may delete the |
* Save the parent here, because we may delete the |
Line 273 rew_last(struct roff_man *mdoc, const struct roff_node |
|
Line 272 rew_last(struct roff_man *mdoc, const struct roff_node |
|
*/ |
*/ |
np = mdoc->last->parent; |
np = mdoc->last->parent; |
mdoc_valid_post(mdoc); |
mdoc_valid_post(mdoc); |
n = mdoc->last; |
|
mdoc->last = np; |
mdoc->last = np; |
assert(mdoc->last); |
assert(mdoc->last); |
mdoc->last->last = n; |
|
} |
} |
|
mdoc->next = ROFF_NEXT_SIBLING; |
mdoc_valid_post(mdoc); |
mdoc_valid_post(mdoc); |
} |
} |
|
|
Line 644 blk_exp_close(MACRO_PROT_ARGS) |
|
Line 642 blk_exp_close(MACRO_PROT_ARGS) |
|
if (body == NULL) { |
if (body == NULL) { |
mandoc_msg(MANDOCERR_BLK_NOTOPEN, mdoc->parse, |
mandoc_msg(MANDOCERR_BLK_NOTOPEN, mdoc->parse, |
line, ppos, mdoc_macronames[tok]); |
line, ppos, mdoc_macronames[tok]); |
|
if (later != NULL) |
|
later->flags &= ~MDOC_BROKEN; |
if (maxargs && endbody == NULL) { |
if (maxargs && endbody == NULL) { |
/* |
/* |
* Stray .Ec without previous .Eo: |
* Stray .Ec without previous .Eo: |
Line 671 blk_exp_close(MACRO_PROT_ARGS) |
|
Line 671 blk_exp_close(MACRO_PROT_ARGS) |
|
|
|
if (endbody != NULL) |
if (endbody != NULL) |
n = endbody; |
n = endbody; |
|
|
|
ntok = TOKEN_NONE; |
for (j = 0; ; j++) { |
for (j = 0; ; j++) { |
lastarg = *pos; |
lastarg = *pos; |
|
|
Line 698 blk_exp_close(MACRO_PROT_ARGS) |
|
Line 700 blk_exp_close(MACRO_PROT_ARGS) |
|
} |
} |
|
|
if (n != NULL) { |
if (n != NULL) { |
if (n != mdoc->last && n->flags & MDOC_BROKEN) { |
if (ntok != TOKEN_NONE && n->flags & MDOC_BROKEN) { |
target = n; |
target = n; |
do |
do |
target = target->parent; |
target = target->parent; |
Line 1395 in_line_eoln(MACRO_PROT_ARGS) |
|
Line 1397 in_line_eoln(MACRO_PROT_ARGS) |
|
if (mdoc->next == ROFF_NEXT_SIBLING) |
if (mdoc->next == ROFF_NEXT_SIBLING) |
n = n->parent; |
n = n->parent; |
if (n->tok == MDOC_Nm) |
if (n->tok == MDOC_Nm) |
rew_last(mdoc, mdoc->last->parent); |
rew_last(mdoc, n->parent); |
} |
} |
|
|
if (buf[*pos] == '\0' && |
if (buf[*pos] == '\0' && |