version 1.112, 2015/01/20 21:16:51 |
version 1.115, 2015/01/24 01:58:33 |
Line 195 static const char * const mandocerrs[MANDOCERR_MAX] = |
|
Line 195 static const char * const mandocerrs[MANDOCERR_MAX] = |
|
"skipping item outside list", |
"skipping item outside list", |
"skipping column outside column list", |
"skipping column outside column list", |
"skipping end of block that is not open", |
"skipping end of block that is not open", |
|
"fewer RS blocks open, skipping", |
"inserting missing end of block", |
"inserting missing end of block", |
"appending missing end of block", |
"appending missing end of block", |
|
|
Line 215 static const char * const mandocerrs[MANDOCERR_MAX] = |
|
Line 216 static const char * const mandocerrs[MANDOCERR_MAX] = |
|
|
|
"unsupported feature", |
"unsupported feature", |
"input too large", |
"input too large", |
|
"unsupported control character", |
"unsupported roff request", |
"unsupported roff request", |
"unsupported table syntax", |
"unsupported table syntax", |
"unsupported table option", |
"unsupported table option", |
Line 307 mparse_buf_r(struct mparse *curp, struct buf blk, size |
|
Line 309 mparse_buf_r(struct mparse *curp, struct buf blk, size |
|
{ |
{ |
const struct tbl_span *span; |
const struct tbl_span *span; |
struct buf ln; |
struct buf ln; |
|
const char *save_file; |
char *cp; |
char *cp; |
size_t pos; /* byte number in the ln buffer */ |
size_t pos; /* byte number in the ln buffer */ |
enum rofferr rr; |
enum rofferr rr; |
Line 368 mparse_buf_r(struct mparse *curp, struct buf blk, size |
|
Line 371 mparse_buf_r(struct mparse *curp, struct buf blk, size |
|
if (c & 0x80) { |
if (c & 0x80) { |
if ( ! (curp->filenc && preconv_encode( |
if ( ! (curp->filenc && preconv_encode( |
&blk, &i, &ln, &pos, &curp->filenc))) { |
&blk, &i, &ln, &pos, &curp->filenc))) { |
mandoc_vmsg(MANDOCERR_BADCHAR, |
mandoc_vmsg(MANDOCERR_CHAR_BAD, curp, |
curp, curp->line, pos, |
curp->line, pos, "0x%x", c); |
"0x%x", c); |
|
ln.buf[pos++] = '?'; |
ln.buf[pos++] = '?'; |
i++; |
i++; |
} |
} |
Line 382 mparse_buf_r(struct mparse *curp, struct buf blk, size |
|
Line 384 mparse_buf_r(struct mparse *curp, struct buf blk, size |
|
*/ |
*/ |
|
|
if (c == 0x7f || (c < 0x20 && c != 0x09)) { |
if (c == 0x7f || (c < 0x20 && c != 0x09)) { |
mandoc_vmsg(MANDOCERR_BADCHAR, curp, |
mandoc_vmsg(c == 0x00 || c == 0x04 || |
curp->line, pos, "0x%x", c); |
c > 0x0a ? MANDOCERR_CHAR_BAD : |
|
MANDOCERR_CHAR_UNSUPP, |
|
curp, curp->line, pos, "0x%x", c); |
i++; |
i++; |
ln.buf[pos++] = '?'; |
ln.buf[pos++] = '?'; |
continue; |
continue; |
Line 439 mparse_buf_r(struct mparse *curp, struct buf blk, size |
|
Line 443 mparse_buf_r(struct mparse *curp, struct buf blk, size |
|
|
|
if ( ! (isascii(c) && |
if ( ! (isascii(c) && |
(isgraph(c) || isblank(c)))) { |
(isgraph(c) || isblank(c)))) { |
mandoc_vmsg(MANDOCERR_BADCHAR, curp, |
mandoc_vmsg(MANDOCERR_CHAR_BAD, curp, |
curp->line, pos, "0x%x", c); |
curp->line, pos, "0x%x", c); |
i += 2; |
i += 2; |
ln.buf[pos++] = '?'; |
ln.buf[pos++] = '?'; |
|
|
*/ |
*/ |
if (curp->secondary) |
if (curp->secondary) |
curp->secondary->sz -= pos + 1; |
curp->secondary->sz -= pos + 1; |
|
save_file = curp->file; |
save_child = curp->child; |
save_child = curp->child; |
if (mparse_open(curp, &fd, ln.buf + of) == |
if (mparse_open(curp, &fd, ln.buf + of) == |
MANDOCLEVEL_OK) |
MANDOCLEVEL_OK) { |
mparse_readfd(curp, fd, ln.buf + of); |
mparse_readfd(curp, fd, ln.buf + of); |
else { |
curp->file = save_file; |
|
} else { |
|
curp->file = save_file; |
mandoc_vmsg(MANDOCERR_SO_FAIL, |
mandoc_vmsg(MANDOCERR_SO_FAIL, |
curp, curp->line, pos, |
curp, curp->line, pos, |
".so %s", ln.buf + of); |
".so %s", ln.buf + of); |