version 1.148, 2010/12/25 13:50:37 |
version 1.150, 2011/01/01 12:18:37 |
Line 329 mdoc_valid_pre(struct mdoc *mdoc, struct mdoc_node *n) |
|
Line 329 mdoc_valid_pre(struct mdoc *mdoc, struct mdoc_node *n) |
|
int line, pos; |
int line, pos; |
char *tp; |
char *tp; |
|
|
if (MDOC_TEXT == n->type) { |
switch (n->type) { |
|
case (MDOC_TEXT): |
tp = n->string; |
tp = n->string; |
line = n->line; |
line = n->line; |
pos = n->pos; |
pos = n->pos; |
check_text(mdoc, line, pos, tp); |
check_text(mdoc, line, pos, tp); |
|
/* FALLTHROUGH */ |
|
case (MDOC_TBL): |
|
/* FALLTHROUGH */ |
|
case (MDOC_ROOT): |
return(1); |
return(1); |
|
default: |
|
break; |
} |
} |
|
|
check_args(mdoc, n); |
check_args(mdoc, n); |
Line 357 mdoc_valid_post(struct mdoc *mdoc) |
|
Line 364 mdoc_valid_post(struct mdoc *mdoc) |
|
return(1); |
return(1); |
mdoc->last->flags |= MDOC_VALID; |
mdoc->last->flags |= MDOC_VALID; |
|
|
if (MDOC_TEXT == mdoc->last->type) |
switch (mdoc->last->type) { |
|
case (MDOC_TEXT): |
|
/* FALLTHROUGH */ |
|
case (MDOC_TBL): |
return(1); |
return(1); |
if (MDOC_ROOT == mdoc->last->type) |
case (MDOC_ROOT): |
return(post_root(mdoc)); |
return(post_root(mdoc)); |
|
default: |
|
break; |
|
} |
|
|
if (NULL == mdoc_valids[mdoc->last->tok].post) |
if (NULL == mdoc_valids[mdoc->last->tok].post) |
return(1); |
return(1); |
Line 1649 post_rs(POST_ARGS) |
|
Line 1662 post_rs(POST_ARGS) |
|
{ |
{ |
struct mdoc_node *nn, *next, *prev; |
struct mdoc_node *nn, *next, *prev; |
int i, j; |
int i, j; |
int *tj; |
|
#define RS_JOURNAL (1 << 0) |
|
#define RS_TITLE (1 << 1) |
|
|
|
/* Mark whether we're carrying both a %T and %J. */ |
if (MDOC_BODY != mdoc->last->type) |
|
|
tj = &mdoc->last->norm->Rs.titlejournal; |
|
|
|
if (MDOC_BLOCK == mdoc->last->type) { |
|
if ( ! (RS_JOURNAL & *tj && RS_TITLE & *tj)) |
|
*tj = 0; |
|
return(1); |
return(1); |
} else if (MDOC_BODY != mdoc->last->type) |
|
return(1); |
|
|
|
/* |
/* |
* Make sure only certain types of nodes are allowed within the |
* Make sure only certain types of nodes are allowed within the |
Line 1677 post_rs(POST_ARGS) |
|
Line 1679 post_rs(POST_ARGS) |
|
break; |
break; |
|
|
if (i < RSORD_MAX) { |
if (i < RSORD_MAX) { |
if (MDOC__T == rsord[i]) |
if (MDOC__J == rsord[i]) |
*tj |= RS_TITLE; |
mdoc->last->norm->Rs.child_J = nn; |
else if (MDOC__J == rsord[i]) |
|
*tj |= RS_JOURNAL; |
|
next = nn->next; |
next = nn->next; |
continue; |
continue; |
} |
} |