version 1.71, 2010/05/09 21:19:42 |
version 1.74, 2010/05/14 15:26:39 |
Line 1039 post_it(POST_ARGS) |
|
Line 1039 post_it(POST_ARGS) |
|
for (i = 0; c && MDOC_HEAD == c->type; c = c->next) |
for (i = 0; c && MDOC_HEAD == c->type; c = c->next) |
i++; |
i++; |
|
|
if (i < cols || i == (cols + 1)) { |
if (i < cols) { |
if ( ! mdoc_vwarn(mdoc, mdoc->last->line, |
if ( ! mdoc_vwarn(mdoc, mdoc->last->line, |
mdoc->last->pos, "column " |
mdoc->last->pos, "column " |
"mismatch: have %d, want %d", |
"mismatch: have %d, want %d", |
i, cols)) |
i, cols)) |
return(0); |
return(0); |
break; |
break; |
} else if (i == cols) |
} else if (i == cols || i == cols + 1) |
break; |
break; |
|
|
return(mdoc_verr(mdoc, mdoc->last->line, |
return(mdoc_verr(mdoc, mdoc->last->line, |
Line 1162 post_st(POST_ARGS) |
|
Line 1162 post_st(POST_ARGS) |
|
|
|
if (mdoc_a2st(mdoc->last->child->string)) |
if (mdoc_a2st(mdoc->last->child->string)) |
return(1); |
return(1); |
return(mdoc_nerr(mdoc, mdoc->last, EBADSTAND)); |
return(mdoc_nwarn(mdoc, mdoc->last, EBADSTAND)); |
} |
} |
|
|
|
|
Line 1286 post_sh_head(POST_ARGS) |
|
Line 1286 post_sh_head(POST_ARGS) |
|
return(mdoc_nerr(mdoc, n, ETOOLONG)); |
return(mdoc_nerr(mdoc, n, ETOOLONG)); |
} |
} |
|
|
sec = mdoc_atosec(buf); |
sec = mdoc_str2sec(buf); |
|
|
/* |
/* |
* Check: NAME should always be first, CUSTOM has no roles, |
* Check: NAME should always be first, CUSTOM has no roles, |
* non-CUSTOM has a conventional order to be followed. |
* non-CUSTOM has a conventional order to be followed. |
*/ |
*/ |
|
|
if (SEC_NAME != sec && SEC_NONE == mdoc->lastnamed && |
if (SEC_NAME != sec && SEC_NONE == mdoc->lastnamed) |
! mdoc_nwarn(mdoc, mdoc->last, ESECNAME)) |
if ( ! mdoc_nwarn(mdoc, mdoc->last, ESECNAME)) |
return(0); |
return(0); |
|
|
if (SEC_CUSTOM == sec) |
if (SEC_CUSTOM == sec) |
return(1); |
return(1); |
|
|
if (sec == mdoc->lastnamed) |
if (sec == mdoc->lastnamed) |
if ( ! mdoc_nwarn(mdoc, mdoc->last, ESECREP)) |
if ( ! mdoc_nwarn(mdoc, mdoc->last, ESECREP)) |
return(0); |
return(0); |
|
|
if (sec < mdoc->lastnamed) |
if (sec < mdoc->lastnamed) |
if ( ! mdoc_nwarn(mdoc, mdoc->last, ESECOOO)) |
if ( ! mdoc_nwarn(mdoc, mdoc->last, ESECOOO)) |
return(0); |
return(0); |