version 1.344, 2017/06/27 12:18:00 |
version 1.346, 2017/07/01 09:47:30 |
|
|
|
|
#include "mandoc_aux.h" |
#include "mandoc_aux.h" |
#include "mandoc.h" |
#include "mandoc.h" |
|
#include "mandoc_xr.h" |
#include "roff.h" |
#include "roff.h" |
#include "mdoc.h" |
#include "mdoc.h" |
#include "libmandoc.h" |
#include "libmandoc.h" |
Line 1460 post_it(POST_ARGS) |
|
Line 1461 post_it(POST_ARGS) |
|
|
|
assert(nit->head->child == NULL); |
assert(nit->head->child == NULL); |
|
|
i = 0; |
if (nit->head->next->child == NULL && |
for (nch = nit->child; nch != NULL; nch = nch->next) |
nit->head->next->next == NULL) { |
if (nch->type == ROFFT_BODY) |
mandoc_msg(MANDOCERR_MACRO_EMPTY, mdoc->parse, |
i++; |
nit->line, nit->pos, "It"); |
|
roff_node_delete(mdoc, nit); |
|
break; |
|
} |
|
|
|
i = 0; |
|
for (nch = nit->child; nch != NULL; nch = nch->next) { |
|
if (nch->type != ROFFT_BODY) |
|
continue; |
|
if (i++ && nch->flags & NODE_LINE) |
|
mandoc_msg(MANDOCERR_TA_LINE, mdoc->parse, |
|
nch->line, nch->pos, "Ta"); |
|
} |
if (i < cols || i > cols + 1) |
if (i < cols || i > cols + 1) |
mandoc_vmsg(MANDOCERR_BL_COL, |
mandoc_vmsg(MANDOCERR_BL_COL, |
mdoc->parse, nit->line, nit->pos, |
mdoc->parse, nit->line, nit->pos, |
"%d columns, %d cells", cols, i); |
"%d columns, %d cells", cols, i); |
|
else if (nit->head->next->child != NULL && |
|
nit->head->next->child->line > nit->line) |
|
mandoc_msg(MANDOCERR_IT_NOARG, mdoc->parse, |
|
nit->line, nit->pos, "Bl -column It"); |
break; |
break; |
default: |
default: |
abort(); |
abort(); |
Line 2321 post_xr(POST_ARGS) |
|
Line 2337 post_xr(POST_ARGS) |
|
if (nch->next == NULL) { |
if (nch->next == NULL) { |
mandoc_vmsg(MANDOCERR_XR_NOSEC, mdoc->parse, |
mandoc_vmsg(MANDOCERR_XR_NOSEC, mdoc->parse, |
n->line, n->pos, "Xr %s", nch->string); |
n->line, n->pos, "Xr %s", nch->string); |
} else |
} else { |
assert(nch->next == n->last); |
assert(nch->next == n->last); |
|
mandoc_xr_add(nch->next->string, nch->string, |
|
nch->line, nch->pos); |
|
} |
post_delim(mdoc); |
post_delim(mdoc); |
} |
} |
|
|