version 1.28, 2012/02/16 20:51:31 |
version 1.31, 2012/07/18 11:11:12 |
|
|
void *arg; /* argument to mmsg */ |
void *arg; /* argument to mmsg */ |
const char *file; |
const char *file; |
struct buf *secondary; |
struct buf *secondary; |
|
char *defos; /* default operating system */ |
}; |
}; |
|
|
static void resize_buf(struct buf *, size_t); |
static void resize_buf(struct buf *, size_t); |
Line 105 static const char * const mandocerrs[MANDOCERR_MAX] = |
|
Line 106 static const char * const mandocerrs[MANDOCERR_MAX] = |
|
".so is fragile, better use ln(1)", |
".so is fragile, better use ln(1)", |
"NAME section must come first", |
"NAME section must come first", |
"bad NAME section contents", |
"bad NAME section contents", |
"manual name not yet set", |
|
"sections out of conventional order", |
"sections out of conventional order", |
"duplicate section name", |
"duplicate section name", |
"section not in conventional manual section", |
"section not in conventional manual section", |
Line 113 static const char * const mandocerrs[MANDOCERR_MAX] = |
|
Line 113 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", |
"skipping paragraph macro", |
|
"moving paragraph macro out of list", |
"skipping no-space macro", |
"skipping no-space macro", |
"blocks badly nested", |
"blocks badly nested", |
"child violates parent syntax", |
"child violates parent syntax", |
Line 173 static const char * const mandocerrs[MANDOCERR_MAX] = |
|
Line 174 static const char * const mandocerrs[MANDOCERR_MAX] = |
|
"input stack limit exceeded, infinite loop?", |
"input stack limit exceeded, infinite loop?", |
"skipping bad character", |
"skipping bad character", |
"escaped character not allowed in a name", |
"escaped character not allowed in a name", |
|
"manual name not yet set", |
"skipping text before the first section header", |
"skipping text before the first section header", |
"skipping unknown macro", |
"skipping unknown macro", |
"NOT IMPLEMENTED, please use groff: skipping request", |
"NOT IMPLEMENTED, please use groff: skipping request", |
Line 247 pset(const char *buf, int pos, struct mparse *curp) |
|
Line 249 pset(const char *buf, int pos, struct mparse *curp) |
|
switch (curp->inttype) { |
switch (curp->inttype) { |
case (MPARSE_MDOC): |
case (MPARSE_MDOC): |
if (NULL == curp->pmdoc) |
if (NULL == curp->pmdoc) |
curp->pmdoc = mdoc_alloc(curp->roff, curp); |
curp->pmdoc = mdoc_alloc(curp->roff, curp, |
|
curp->defos); |
assert(curp->pmdoc); |
assert(curp->pmdoc); |
curp->mdoc = curp->pmdoc; |
curp->mdoc = curp->pmdoc; |
return; |
return; |
Line 263 pset(const char *buf, int pos, struct mparse *curp) |
|
Line 266 pset(const char *buf, int pos, struct mparse *curp) |
|
|
|
if (pos >= 3 && 0 == memcmp(buf, ".Dd", 3)) { |
if (pos >= 3 && 0 == memcmp(buf, ".Dd", 3)) { |
if (NULL == curp->pmdoc) |
if (NULL == curp->pmdoc) |
curp->pmdoc = mdoc_alloc(curp->roff, curp); |
curp->pmdoc = mdoc_alloc(curp->roff, curp, |
|
curp->defos); |
assert(curp->pmdoc); |
assert(curp->pmdoc); |
curp->mdoc = curp->pmdoc; |
curp->mdoc = curp->pmdoc; |
return; |
return; |
Line 720 mparse_readfd(struct mparse *curp, int fd, const char |
|
Line 724 mparse_readfd(struct mparse *curp, int fd, const char |
|
} |
} |
|
|
struct mparse * |
struct mparse * |
mparse_alloc(enum mparset inttype, enum mandoclevel wlevel, mandocmsg mmsg, void *arg) |
mparse_alloc(enum mparset inttype, enum mandoclevel wlevel, |
|
mandocmsg mmsg, void *arg, char *defos) |
{ |
{ |
struct mparse *curp; |
struct mparse *curp; |
|
|
Line 732 mparse_alloc(enum mparset inttype, enum mandoclevel wl |
|
Line 737 mparse_alloc(enum mparset inttype, enum mandoclevel wl |
|
curp->mmsg = mmsg; |
curp->mmsg = mmsg; |
curp->arg = arg; |
curp->arg = arg; |
curp->inttype = inttype; |
curp->inttype = inttype; |
|
curp->defos = defos; |
|
|
curp->roff = roff_alloc(curp); |
curp->roff = roff_alloc(curp); |
return(curp); |
return(curp); |