summaryrefslogtreecommitdiffstats
path: root/mdoc.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2011-07-18 07:46:41 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2011-07-18 07:46:41 +0000
commitfe200714381b9d81c222bda224df0dc6dfc61c8a (patch)
tree209bef8a4f53984c628091c1fad8b4817c290671 /mdoc.c
parentbafe4939fd3c12ed13bf24cf2f317e39910722bb (diff)
downloadmandoc-fe200714381b9d81c222bda224df0dc6dfc61c8a.tar.gz
Make `struct roff' be passed into libmdoc and libman upon creation.
This is required for supporting in-line equations. While here, push registers properly into roff and add an set/get/mod interface.
Diffstat (limited to 'mdoc.c')
-rw-r--r--mdoc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/mdoc.c b/mdoc.c
index fd74be55..82798ed3 100644
--- a/mdoc.c
+++ b/mdoc.c
@@ -193,14 +193,14 @@ mdoc_free(struct mdoc *mdoc)
* Allocate volatile and non-volatile parse resources.
*/
struct mdoc *
-mdoc_alloc(struct regset *regs, struct mparse *parse)
+mdoc_alloc(struct roff *roff, struct mparse *parse)
{
struct mdoc *p;
p = mandoc_calloc(1, sizeof(struct mdoc));
p->parse = parse;
- p->regs = regs;
+ p->roff = roff;
mdoc_hash_init();
mdoc_alloc1(p);
@@ -290,8 +290,8 @@ mdoc_parseln(struct mdoc *m, int ln, char *buf, int offs)
* whether this mode is on or off.
* Note that this mode is also switched by the Sh macro.
*/
- if (m->regs->regs[(int)REG_nS].set) {
- if (m->regs->regs[(int)REG_nS].v.u)
+ if (roff_regisset(m->roff, REG_nS)) {
+ if (roff_regget(m->roff, REG_nS))
m->flags |= MDOC_SYNOPSIS;
else
m->flags &= ~MDOC_SYNOPSIS;