version 1.6, 2012/02/26 21:01:43 |
version 1.7, 2012/05/24 23:33:23 |
|
|
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); |
|
|
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; |
|
|
|
|
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; |
|
|
} |
} |
|
|
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; |
|
|
|
|
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); |