version 1.263, 2014/11/30 05:29:00 |
version 1.264, 2014/12/18 19:23:41 |
Line 1197 post_it(POST_ARGS) |
|
Line 1197 post_it(POST_ARGS) |
|
struct mdoc_node *nbl, *nit, *nch; |
struct mdoc_node *nbl, *nit, *nch; |
|
|
nit = mdoc->last; |
nit = mdoc->last; |
if (MDOC_BLOCK != nit->type) |
if (nit->type != MDOC_BLOCK) |
return; |
return; |
|
|
nbl = nit->parent->parent; |
nbl = nit->parent->parent; |
Line 1213 post_it(POST_ARGS) |
|
Line 1213 post_it(POST_ARGS) |
|
case LIST_inset: |
case LIST_inset: |
/* FALLTHROUGH */ |
/* FALLTHROUGH */ |
case LIST_diag: |
case LIST_diag: |
if (NULL == nit->head->child) |
if (nit->head->child == NULL) |
mandoc_vmsg(MANDOCERR_IT_NOHEAD, |
mandoc_vmsg(MANDOCERR_IT_NOHEAD, |
mdoc->parse, nit->line, nit->pos, |
mdoc->parse, nit->line, nit->pos, |
"Bl -%s It", |
"Bl -%s It", |
Line 1226 post_it(POST_ARGS) |
|
Line 1226 post_it(POST_ARGS) |
|
case LIST_enum: |
case LIST_enum: |
/* FALLTHROUGH */ |
/* FALLTHROUGH */ |
case LIST_hyphen: |
case LIST_hyphen: |
if (NULL == nit->body->child) |
if (nit->body == NULL || nit->body->child == NULL) |
mandoc_vmsg(MANDOCERR_IT_NOBODY, |
mandoc_vmsg(MANDOCERR_IT_NOBODY, |
mdoc->parse, nit->line, nit->pos, |
mdoc->parse, nit->line, nit->pos, |
"Bl -%s It", |
"Bl -%s It", |
mdoc_argnames[nbl->args->argv[0].arg]); |
mdoc_argnames[nbl->args->argv[0].arg]); |
/* FALLTHROUGH */ |
/* FALLTHROUGH */ |
case LIST_item: |
case LIST_item: |
if (NULL != nit->head->child) |
if (nit->head->child != NULL) |
mandoc_vmsg(MANDOCERR_ARG_SKIP, |
mandoc_vmsg(MANDOCERR_ARG_SKIP, |
mdoc->parse, nit->line, nit->pos, |
mdoc->parse, nit->line, nit->pos, |
"It %s", nit->head->child->string); |
"It %s", nit->head->child->string); |
Line 1241 post_it(POST_ARGS) |
|
Line 1241 post_it(POST_ARGS) |
|
case LIST_column: |
case LIST_column: |
cols = (int)nbl->norm->Bl.ncols; |
cols = (int)nbl->norm->Bl.ncols; |
|
|
assert(NULL == nit->head->child); |
assert(nit->head->child == NULL); |
|
|
for (i = 0, nch = nit->child; nch; nch = nch->next) |
for (i = 0, nch = nit->child; nch; nch = nch->next) |
if (MDOC_BODY == nch->type) |
if (nch->type == MDOC_BODY) |
i++; |
i++; |
|
|
if (i < cols || i > cols + 1) |
if (i < cols || i > cols + 1) |