version 1.60, 2010/12/01 22:02:29 |
version 1.61, 2010/12/21 23:46:18 |
|
|
static int |
static int |
rew_last(struct mdoc *mdoc, const struct mdoc_node *to) |
rew_last(struct mdoc *mdoc, const struct mdoc_node *to) |
{ |
{ |
|
struct mdoc_node *n; |
|
|
assert(to); |
assert(to); |
mdoc->next = MDOC_NEXT_SIBLING; |
mdoc->next = MDOC_NEXT_SIBLING; |
|
|
while (mdoc->last != to) { |
while (mdoc->last != to) { |
if ( ! mdoc_valid_post(mdoc)) |
if ( ! mdoc_valid_post(mdoc)) |
return(0); |
return(0); |
|
n = mdoc->last; |
mdoc->last = mdoc->last->parent; |
mdoc->last = mdoc->last->parent; |
assert(mdoc->last); |
assert(mdoc->last); |
|
mdoc->last->last = n; |
} |
} |
|
|
return(mdoc_valid_post(mdoc)); |
return(mdoc_valid_post(mdoc)); |