From 495895571c4a70fbf6e228700c3d58f4e7560839 Mon Sep 17 00:00:00 2001 From: Kristaps Dzonsons Date: Mon, 18 Jul 2011 07:46:41 +0000 Subject: 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. --- mdoc.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'mdoc.c') diff --git a/mdoc.c b/mdoc.c index ea3fda26..a648e9a5 100644 --- a/mdoc.c +++ b/mdoc.c @@ -1,4 +1,4 @@ -/* $Id: mdoc.c,v 1.188 2011/03/28 23:52:13 kristaps Exp $ */ +/* $Id: mdoc.c,v 1.189 2011/07/18 07:46:41 kristaps Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2010 Ingo Schwarze @@ -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; -- cgit v1.2.3