version 1.188, 2011/03/28 23:52:13 |
version 1.189, 2011/07/18 07:46:41 |
Line 193 mdoc_free(struct mdoc *mdoc) |
|
Line 193 mdoc_free(struct mdoc *mdoc) |
|
* Allocate volatile and non-volatile parse resources. |
* Allocate volatile and non-volatile parse resources. |
*/ |
*/ |
struct mdoc * |
struct mdoc * |
mdoc_alloc(struct regset *regs, struct mparse *parse) |
mdoc_alloc(struct roff *roff, struct mparse *parse) |
{ |
{ |
struct mdoc *p; |
struct mdoc *p; |
|
|
p = mandoc_calloc(1, sizeof(struct mdoc)); |
p = mandoc_calloc(1, sizeof(struct mdoc)); |
|
|
p->parse = parse; |
p->parse = parse; |
p->regs = regs; |
p->roff = roff; |
|
|
mdoc_hash_init(); |
mdoc_hash_init(); |
mdoc_alloc1(p); |
mdoc_alloc1(p); |
Line 290 mdoc_parseln(struct mdoc *m, int ln, char *buf, int of |
|
Line 290 mdoc_parseln(struct mdoc *m, int ln, char *buf, int of |
|
* whether this mode is on or off. |
* whether this mode is on or off. |
* Note that this mode is also switched by the Sh macro. |
* Note that this mode is also switched by the Sh macro. |
*/ |
*/ |
if (m->regs->regs[(int)REG_nS].set) { |
if (roff_regisset(m->roff, REG_nS)) { |
if (m->regs->regs[(int)REG_nS].v.u) |
if (roff_regget(m->roff, REG_nS)) |
m->flags |= MDOC_SYNOPSIS; |
m->flags |= MDOC_SYNOPSIS; |
else |
else |
m->flags &= ~MDOC_SYNOPSIS; |
m->flags &= ~MDOC_SYNOPSIS; |