version 1.48, 2010/03/31 07:42:04 |
version 1.49, 2010/03/31 08:04:57 |
Line 879 blk_full(MACRO_PROT_ARGS) |
|
Line 879 blk_full(MACRO_PROT_ARGS) |
|
int c, la; |
int c, la; |
struct mdoc_arg *arg; |
struct mdoc_arg *arg; |
struct mdoc_node *head; /* save of head macro */ |
struct mdoc_node *head; /* save of head macro */ |
|
struct mdoc_node *body; /* save of body macro */ |
#ifdef UGLY |
#ifdef UGLY |
struct mdoc_node *n; |
struct mdoc_node *n; |
#endif |
#endif |
Line 923 blk_full(MACRO_PROT_ARGS) |
|
Line 924 blk_full(MACRO_PROT_ARGS) |
|
if ( ! mdoc_block_alloc(m, line, ppos, tok, arg)) |
if ( ! mdoc_block_alloc(m, line, ppos, tok, arg)) |
return(0); |
return(0); |
|
|
head = NULL; |
head = body = NULL; |
|
|
/* |
/* |
* The `Nd' macro has all arguments in its body: it's a hybrid |
* The `Nd' macro has all arguments in its body: it's a hybrid |
Line 938 blk_full(MACRO_PROT_ARGS) |
|
Line 939 blk_full(MACRO_PROT_ARGS) |
|
return(0); |
return(0); |
if ( ! mdoc_body_alloc(m, line, ppos, tok)) |
if ( ! mdoc_body_alloc(m, line, ppos, tok)) |
return(0); |
return(0); |
|
body = m->last; |
} |
} |
|
|
for (;;) { |
for (;;) { |
Line 994 blk_full(MACRO_PROT_ARGS) |
|
Line 996 blk_full(MACRO_PROT_ARGS) |
|
if (1 == ppos && ! append_delims(m, line, pos, buf)) |
if (1 == ppos && ! append_delims(m, line, pos, buf)) |
return(0); |
return(0); |
|
|
/* See notes on `Nd' hybrid, above. */ |
/* If we've already opened our body, exit now. */ |
|
|
if (MDOC_Nd == tok) |
if (NULL != body) |
return(1); |
return(1); |
|
|
#ifdef UGLY |
#ifdef UGLY |
/* |
/* |
* If there is an open sub-block requiring explicit close-out, |
* If there is an open (i.e., unvalidated) sub-block requiring |
* postpone switching the current block from head to body until |
* explicit close-out, postpone switching the current block from |
* the rew_sub() call closing out that sub-block. |
* head to body until the rew_sub() call closing out that |
|
* sub-block. |
*/ |
*/ |
for (n = m->last; n && n != head; n = n->parent) { |
for (n = m->last; n && n != head; n = n->parent) { |
if (MDOC_EXPLICIT & mdoc_macros[n->tok].flags && |
if (MDOC_BLOCK == n->type && |
MDOC_BLOCK == n->type) { |
MDOC_EXPLICIT & mdoc_macros[n->tok].flags && |
|
! (MDOC_VALID & n->flags)) { |
|
assert( ! (MDOC_ACTED & n->flags)); |
n->pending = head; |
n->pending = head; |
return(1); |
return(1); |
} |
} |