version 1.123, 2010/12/15 23:39:40 |
version 1.130, 2011/01/01 16:18:39 |
Line 145 static const char * const mandocerrs[MANDOCERR_MAX] = |
|
Line 145 static const char * const mandocerrs[MANDOCERR_MAX] = |
|
|
|
/* related to macros and nesting */ |
/* related to macros and nesting */ |
"skipping obsolete macro", |
"skipping obsolete macro", |
|
"skipping paragraph macro", |
"blocks badly nested", |
"blocks badly nested", |
"child violates parent syntax", |
"child violates parent syntax", |
"nested displays are not portable", |
"nested displays are not portable", |
Line 178 static const char * const mandocerrs[MANDOCERR_MAX] = |
|
Line 179 static const char * const mandocerrs[MANDOCERR_MAX] = |
|
|
|
"generic error", |
"generic error", |
|
|
|
"bad table syntax", |
|
"bad table option", |
|
"bad table layout", |
|
"no table layout cells specified", |
|
"no table data cells specified", |
"input stack limit exceeded, infinite loop?", |
"input stack limit exceeded, infinite loop?", |
"skipping bad character", |
"skipping bad character", |
"skipping text before the first section header", |
"skipping text before the first section header", |
"skipping unknown macro", |
"skipping unknown macro", |
"skipping paragraph macro", |
|
"NOT IMPLEMENTED: skipping request", |
"NOT IMPLEMENTED: skipping request", |
"line scope broken", |
"line scope broken", |
"argument count wrong", |
"argument count wrong", |
|
|
resize_buf(struct buf *buf, size_t initial) |
resize_buf(struct buf *buf, size_t initial) |
{ |
{ |
|
|
buf->sz = buf->sz ? 2 * buf->sz : initial; |
buf->sz = buf->sz > initial/2 ? 2 * buf->sz : initial; |
buf->buf = realloc(buf->buf, buf->sz); |
buf->buf = realloc(buf->buf, buf->sz); |
if (NULL == buf->buf) { |
if (NULL == buf->buf) { |
perror(NULL); |
perror(NULL); |
Line 522 fdesc(struct curparse *curp) |
|
Line 527 fdesc(struct curparse *curp) |
|
} |
} |
|
|
assert(curp->roff); |
assert(curp->roff); |
if ( ! roff_endparse(curp->roff)) { |
roff_endparse(curp->roff); |
assert(MANDOCLEVEL_FATAL <= file_status); |
|
goto cleanup; |
|
} |
|
|
|
/* |
/* |
* With -Wstop and warnings or errors of at least |
* With -Wstop and warnings or errors of at least |
|
|
continue; |
continue; |
} else |
} else |
break; |
break; |
case (ROFF_CONT): |
default: |
break; |
break; |
} |
} |
|
|
|
|
* Lastly, push down into the parsers themselves. One |
* Lastly, push down into the parsers themselves. One |
* of these will have already been set in the pset() |
* of these will have already been set in the pset() |
* routine. |
* routine. |
|
* If libroff returns ROFF_TBL, then add it to the |
|
* currently open parse. Since we only get here if |
|
* there does exist data (see tbl_data.c), we're |
|
* guaranteed that something's been allocated. |
*/ |
*/ |
|
|
if (curp->man || curp->mdoc) { |
if (ROFF_TBL == rr) { |
|
assert(curp->man || curp->mdoc); |
|
if (curp->man) |
|
man_addspan(curp->man, roff_span(curp->roff)); |
|
else |
|
mdoc_addspan(curp->mdoc, roff_span(curp->roff)); |
|
|
|
} else if (curp->man || curp->mdoc) { |
rc = curp->man ? |
rc = curp->man ? |
man_parseln(curp->man, |
man_parseln(curp->man, |
curp->line, ln.buf, of) : |
curp->line, ln.buf, of) : |