version 1.99, 2014/11/27 23:40:19 |
version 1.100, 2014/11/28 06:27:05 |
Line 317 mparse_buf_r(struct mparse *curp, struct buf blk, size |
|
Line 317 mparse_buf_r(struct mparse *curp, struct buf blk, size |
|
struct buf ln; |
struct buf ln; |
size_t pos; /* byte number in the ln buffer */ |
size_t pos; /* byte number in the ln buffer */ |
enum rofferr rr; |
enum rofferr rr; |
int of, rc; |
int of; |
int lnn; /* line number in the real file */ |
int lnn; /* line number in the real file */ |
unsigned char c; |
unsigned char c; |
|
|
|
|
* Do the same for ROFF_EQN. |
* Do the same for ROFF_EQN. |
*/ |
*/ |
|
|
rc = -1; |
if (rr == ROFF_TBL) { |
|
while ((span = roff_span(curp->roff)) != NULL) |
if (ROFF_TBL == rr) |
if (curp->man == NULL) |
while (NULL != (span = roff_span(curp->roff))) { |
mdoc_addspan(curp->mdoc, span); |
rc = curp->man ? |
else |
man_addspan(curp->man, span) : |
man_addspan(curp->man, span); |
mdoc_addspan(curp->mdoc, span); |
} else if (rr == ROFF_EQN) { |
if (0 == rc) |
if (curp->man == NULL) |
break; |
mdoc_addeqn(curp->mdoc, roff_eqn(curp->roff)); |
} |
else |
else if (ROFF_EQN == rr) |
man_addeqn(curp->man, roff_eqn(curp->roff)); |
rc = curp->mdoc ? |
} else if ((curp->man == NULL ? |
mdoc_addeqn(curp->mdoc, |
mdoc_parseln(curp->mdoc, curp->line, ln.buf, of) : |
roff_eqn(curp->roff)) : |
man_parseln(curp->man, curp->line, ln.buf, of)) == 2) |
man_addeqn(curp->man, |
break; |
roff_eqn(curp->roff)); |
|
else if (curp->man || curp->mdoc) |
|
rc = curp->man ? |
|
man_parseln(curp->man, |
|
curp->line, ln.buf, of) : |
|
mdoc_parseln(curp->mdoc, |
|
curp->line, ln.buf, of); |
|
|
|
if (0 == rc) { |
|
assert(MANDOCLEVEL_FATAL <= curp->file_status); |
|
break; |
|
} else if (2 == rc) |
|
break; |
|
|
|
/* Temporary buffers typically are not full. */ |
/* Temporary buffers typically are not full. */ |
|
|