version 1.224, 2014/07/03 23:24:56 |
version 1.225, 2014/07/04 01:50:07 |
Line 727 pre_bl(PRE_ARGS) |
|
Line 727 pre_bl(PRE_ARGS) |
|
if (n->norm->Bl.width || |
if (n->norm->Bl.width || |
n->norm->Bl.offs || |
n->norm->Bl.offs || |
n->norm->Bl.comp) |
n->norm->Bl.comp) |
mdoc_nmsg(mdoc, n, MANDOCERR_LISTFIRST); |
mandoc_msg(MANDOCERR_BL_LATETYPE, |
|
mdoc->parse, n->line, n->pos, |
|
mdoc_argnames[n->args->argv[0].arg]); |
continue; |
continue; |
} |
} |
|
|
/* Allow lists to default to LIST_item. */ |
/* Allow lists to default to LIST_item. */ |
|
|
if (LIST__NONE == n->norm->Bl.type) { |
if (LIST__NONE == n->norm->Bl.type) { |
mdoc_nmsg(mdoc, n, MANDOCERR_LISTTYPE); |
mdoc_nmsg(mdoc, n, MANDOCERR_BL_NOTYPE); |
n->norm->Bl.type = LIST_item; |
n->norm->Bl.type = LIST_item; |
} |
} |
|
|
Line 749 pre_bl(PRE_ARGS) |
|
Line 750 pre_bl(PRE_ARGS) |
|
switch (n->norm->Bl.type) { |
switch (n->norm->Bl.type) { |
case LIST_tag: |
case LIST_tag: |
if (NULL == n->norm->Bl.width) |
if (NULL == n->norm->Bl.width) |
mdoc_nmsg(mdoc, n, MANDOCERR_NOWIDTHARG); |
mdoc_nmsg(mdoc, n, MANDOCERR_BL_WIDTH); |
break; |
break; |
case LIST_column: |
case LIST_column: |
/* FALLTHROUGH */ |
/* FALLTHROUGH */ |
Line 869 pre_bd(PRE_ARGS) |
|
Line 870 pre_bd(PRE_ARGS) |
|
} |
} |
|
|
if (DISP__NONE == n->norm->Bd.type) { |
if (DISP__NONE == n->norm->Bd.type) { |
mdoc_nmsg(mdoc, n, MANDOCERR_DISPTYPE); |
mdoc_nmsg(mdoc, n, MANDOCERR_BD_NOTYPE); |
n->norm->Bd.type = DISP_ragged; |
n->norm->Bd.type = DISP_ragged; |
} |
} |
|
|
Line 934 pre_std(PRE_ARGS) |
|
Line 935 pre_std(PRE_ARGS) |
|
if (MDOC_Std == n->args->argv[0].arg) |
if (MDOC_Std == n->args->argv[0].arg) |
return(1); |
return(1); |
|
|
mdoc_nmsg(mdoc, n, MANDOCERR_NOARGV); |
mandoc_msg(MANDOCERR_ARG_STD, mdoc->parse, |
|
n->line, n->pos, mdoc_macronames[n->tok]); |
return(1); |
return(1); |
} |
} |
|
|
Line 1280 post_it(POST_ARGS) |
|
Line 1282 post_it(POST_ARGS) |
|
nbl = nit->parent->parent; |
nbl = nit->parent->parent; |
lt = nbl->norm->Bl.type; |
lt = nbl->norm->Bl.type; |
|
|
if (LIST__NONE == lt) { |
|
mdoc_nmsg(mdoc, nit, MANDOCERR_LISTTYPE); |
|
return(1); |
|
} |
|
|
|
switch (lt) { |
switch (lt) { |
case LIST_tag: |
case LIST_tag: |
/* FALLTHROUGH */ |
/* FALLTHROUGH */ |
Line 1308 post_it(POST_ARGS) |
|
Line 1305 post_it(POST_ARGS) |
|
/* FALLTHROUGH */ |
/* FALLTHROUGH */ |
case LIST_hyphen: |
case LIST_hyphen: |
if (NULL == nit->body->child) |
if (NULL == nit->body->child) |
mdoc_nmsg(mdoc, nit, MANDOCERR_NOBODY); |
mandoc_msg(MANDOCERR_IT_NOBODY, |
|
mdoc->parse, nit->line, nit->pos, |
|
mdoc_argnames[nbl->args->argv[0].arg]); |
/* FALLTHROUGH */ |
/* FALLTHROUGH */ |
case LIST_item: |
case LIST_item: |
if (NULL != nit->head->child) |
if (NULL != nit->head->child) |
Line 1319 post_it(POST_ARGS) |
|
Line 1318 post_it(POST_ARGS) |
|
|
|
assert(NULL == nit->head->child); |
assert(NULL == nit->head->child); |
|
|
if (NULL == nit->body->child) |
|
mdoc_nmsg(mdoc, nit, MANDOCERR_NOBODY); |
|
|
|
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 (MDOC_BODY == nch->type) |
i++; |
i++; |
Line 1337 post_it(POST_ARGS) |
|
Line 1333 post_it(POST_ARGS) |
|
"columns == %d (have %d)", cols, i); |
"columns == %d (have %d)", cols, i); |
return(MANDOCERR_ARGCOUNT == er); |
return(MANDOCERR_ARGCOUNT == er); |
default: |
default: |
break; |
abort(); |
} |
} |
|
|
return(1); |
return(1); |