=================================================================== RCS file: /cvs/mandoc/read.c,v retrieving revision 1.101 retrieving revision 1.106 diff -u -p -r1.101 -r1.106 --- mandoc/read.c 2014/11/28 18:09:01 1.101 +++ mandoc/read.c 2014/12/28 14:42:27 1.106 @@ -1,4 +1,4 @@ -/* $Id: read.c,v 1.101 2014/11/28 18:09:01 schwarze Exp $ */ +/* $Id: read.c,v 1.106 2014/12/28 14:42:27 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2010-2014 Ingo Schwarze @@ -41,7 +41,6 @@ #include "libmandoc.h" #include "mdoc.h" #include "man.h" -#include "main.h" #define REPARSE_LIMIT 1000 @@ -120,6 +119,7 @@ static const char * const mandocerrs[MANDOCERR_MAX] = /* related to macros and nesting */ "obsolete macro", + "macro neither callable nor escaped", "skipping paragraph macro", "moving paragraph macro out of list", "skipping no-space macro", @@ -145,6 +145,7 @@ static const char * const mandocerrs[MANDOCERR_MAX] = "empty list item", "missing font type, using \\fR", "unknown font type, using \\fR", + "nothing follows prefix", "missing -std argument, adding it", "missing eqn box, using \"\"", @@ -187,6 +188,7 @@ static const char * const mandocerrs[MANDOCERR_MAX] = "ignore data in cell", "data block still open", "ignoring extra data cells", + "ignoring macro in table", /* related to document structure and macros */ "input stack limit exceeded, infinite loop?", @@ -296,7 +298,8 @@ choose_parser(struct mparse *curp) /* Fall back to man(7) as a last resort. */ if (NULL == curp->pman) - curp->pman = man_alloc(curp->roff, curp, + curp->pman = man_alloc( + curp->roff, curp, curp->defos, MPARSE_QUICK & curp->options ? 1 : 0); assert(curp->pman); curp->man = curp->pman; @@ -694,7 +697,8 @@ mparse_end(struct mparse *curp) curp->mdoc = curp->pmdoc; else { if (curp->pman == NULL) - curp->pman = man_alloc(curp->roff, curp, + curp->pman = man_alloc( + curp->roff, curp, curp->defos, curp->options & MPARSE_QUICK ? 1 : 0); curp->man = curp->pman; } @@ -754,12 +758,12 @@ mparse_parse_buffer(struct mparse *curp, struct buf bl } enum mandoclevel -mparse_readmem(struct mparse *curp, const void *buf, size_t len, +mparse_readmem(struct mparse *curp, void *buf, size_t len, const char *file) { struct buf blk; - blk.buf = UNCONST(buf); + blk.buf = buf; blk.sz = len; mparse_parse_buffer(curp, blk, file); @@ -938,7 +942,8 @@ mparse_alloc(int options, enum mandoclevel wlevel, man curp->roff, curp, curp->defos, curp->options & MPARSE_QUICK ? 1 : 0); if (curp->options & MPARSE_MAN) - curp->pman = man_alloc(curp->roff, curp, + curp->pman = man_alloc( + curp->roff, curp, curp->defos, curp->options & MPARSE_QUICK ? 1 : 0); return(curp);