-/* $Id: read.c,v 1.28 2012/02/16 20:51:31 joerg Exp $ */
+/* $Id: read.c,v 1.29 2012/05/27 17:48:57 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010, 2011 Ingo Schwarze <schwarze@openbsd.org>
void *arg; /* argument to mmsg */
const char *file;
struct buf *secondary;
+ char *defos; /* default operating system */
};
static void resize_buf(struct buf *, size_t);
switch (curp->inttype) {
case (MPARSE_MDOC):
if (NULL == curp->pmdoc)
- curp->pmdoc = mdoc_alloc(curp->roff, curp);
+ curp->pmdoc = mdoc_alloc(curp->roff, curp,
+ curp->defos);
assert(curp->pmdoc);
curp->mdoc = curp->pmdoc;
return;
if (pos >= 3 && 0 == memcmp(buf, ".Dd", 3)) {
if (NULL == curp->pmdoc)
- curp->pmdoc = mdoc_alloc(curp->roff, curp);
+ curp->pmdoc = mdoc_alloc(curp->roff, curp,
+ curp->defos);
assert(curp->pmdoc);
curp->mdoc = curp->pmdoc;
return;
}
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;
curp->mmsg = mmsg;
curp->arg = arg;
curp->inttype = inttype;
+ curp->defos = defos;
curp->roff = roff_alloc(curp);
return(curp);