version 1.37, 2009/01/17 16:47:02 |
version 1.38, 2009/01/17 20:10:36 |
Line 465 pre_display(struct mdoc *mdoc, struct mdoc_node *node) |
|
Line 465 pre_display(struct mdoc *mdoc, struct mdoc_node *node) |
|
return(1); |
return(1); |
|
|
assert(mdoc->last); |
assert(mdoc->last); |
|
/* LINTED */ |
for (n = mdoc->last->parent; n; n = n->parent) |
for (n = mdoc->last->parent; n; n = n->parent) |
if (MDOC_BLOCK == n->type) |
if (MDOC_BLOCK == n->type) |
if (MDOC_Bd == n->tok) |
if (MDOC_Bd == n->tok) |
Line 489 pre_bl(struct mdoc *mdoc, struct mdoc_node *node) |
|
Line 490 pre_bl(struct mdoc *mdoc, struct mdoc_node *node) |
|
argv = NULL; |
argv = NULL; |
argc = node->data.block.argc; |
argc = node->data.block.argc; |
|
|
|
/* LINTED */ |
for (i = type = err = 0; i < argc; i++) { |
for (i = type = err = 0; i < argc; i++) { |
argv = &node->data.block.argv[(int)i]; |
argv = &node->data.block.argv[(int)i]; |
assert(argv); |
assert(argv); |
Line 546 pre_bd(struct mdoc *mdoc, struct mdoc_node *node) |
|
Line 548 pre_bd(struct mdoc *mdoc, struct mdoc_node *node) |
|
argv = NULL; |
argv = NULL; |
argc = node->data.block.argc; |
argc = node->data.block.argc; |
|
|
|
/* LINTED */ |
for (err = i = type = 0; 0 == err && i < argc; i++) { |
for (err = i = type = 0; 0 == err && i < argc; i++) { |
argv = &node->data.block.argv[(int)i]; |
argv = &node->data.block.argv[(int)i]; |
assert(argv); |
assert(argv); |
Line 858 post_it(struct mdoc *mdoc) |
|
Line 861 post_it(struct mdoc *mdoc) |
|
|
|
argc = n->data.block.argc; |
argc = n->data.block.argc; |
type = TYPE_NONE; |
type = TYPE_NONE; |
|
sv = -1; |
|
|
/* Some types require block-head, some not. */ |
/* Some types require block-head, some not. */ |
|
|
|
/* LINTED */ |
for (i = 0; TYPE_NONE == type && i < argc; i++) |
for (i = 0; TYPE_NONE == type && i < argc; i++) |
switch (n->data.block.argv[(int)i].arg) { |
switch (n->data.block.argv[(int)i].arg) { |
case (MDOC_Tag): |
case (MDOC_Tag): |
Line 926 post_it(struct mdoc *mdoc) |
|
Line 931 post_it(struct mdoc *mdoc) |
|
if ( ! mdoc_warn(mdoc, WARN_SYNTAX, "macro suggests body children")) |
if ( ! mdoc_warn(mdoc, WARN_SYNTAX, "macro suggests body children")) |
return(0); |
return(0); |
|
|
|
assert(-1 != sv); |
if (MDOC_Column != sv) |
if (MDOC_Column != sv) |
return(1); |
return(1); |
|
|
/* Make sure the number of columns is sane. */ |
/* Make sure the number of columns is sane. */ |
|
|
sv = mdoc->last->parent->parent->data.block.argv->sz; |
argc = mdoc->last->parent->parent->data.block.argv->sz; |
n = mdoc->last->data.block.head->child; |
n = mdoc->last->data.block.head->child; |
|
|
for (i = 0; n; n = n->next) |
for (i = 0; n; n = n->next) |
i++; |
i++; |
|
|
if (i == (size_t)sv) |
if (i == argc) |
return(1); |
return(1); |
return(mdoc_err(mdoc, "expected %d list columns, have %d", sv, (int)i)); |
return(mdoc_err(mdoc, "expected %zu list columns, have %zu", argc, i)); |
#undef TYPE_NONE |
#undef TYPE_NONE |
#undef TYPE_BODY |
#undef TYPE_BODY |
#undef TYPE_HEAD |
#undef TYPE_HEAD |
Line 955 post_bl(struct mdoc *mdoc) |
|
Line 961 post_bl(struct mdoc *mdoc) |
|
return(1); |
return(1); |
assert(MDOC_Bl == mdoc->last->tok); |
assert(MDOC_Bl == mdoc->last->tok); |
|
|
|
/* LINTED */ |
for (n = mdoc->last->child; n; n = n->next) { |
for (n = mdoc->last->child; n; n = n->next) { |
if (MDOC_BLOCK == n->type) |
if (MDOC_BLOCK == n->type) |
if (MDOC_It == n->tok) |
if (MDOC_It == n->tok) |
Line 973 ebool(struct mdoc *mdoc) |
|
Line 980 ebool(struct mdoc *mdoc) |
|
struct mdoc_node *n; |
struct mdoc_node *n; |
|
|
assert(MDOC_ELEM == mdoc->last->type); |
assert(MDOC_ELEM == mdoc->last->type); |
|
/* LINTED */ |
for (n = mdoc->last->child; n; n = n->next) { |
for (n = mdoc->last->child; n; n = n->next) { |
if (MDOC_TEXT != n->type) |
if (MDOC_TEXT != n->type) |
break; |
break; |