version 1.8, 2011/03/31 10:54:39 |
version 1.13, 2011/04/11 21:59:39 |
|
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
*/ |
*/ |
|
#ifdef HAVE_CONFIG_H |
|
#include "config.h" |
|
#endif |
|
|
#include <sys/stat.h> |
#include <sys/stat.h> |
#include <sys/mman.h> |
#include <sys/mman.h> |
|
|
Line 138 static const char * const mandocerrs[MANDOCERR_MAX] = |
|
Line 142 static const char * const mandocerrs[MANDOCERR_MAX] = |
|
"tab in non-literal context", |
"tab in non-literal context", |
"end of line whitespace", |
"end of line whitespace", |
"bad comment style", |
"bad comment style", |
"unknown escape sequence", |
"bad escape sequence", |
"unterminated quoted string", |
"unterminated quoted string", |
|
|
"generic error", |
"generic error", |
Line 350 mparse_buf_r(struct mparse *curp, struct buf blk, int |
|
Line 354 mparse_buf_r(struct mparse *curp, struct buf blk, int |
|
continue; |
continue; |
} |
} |
|
|
if ('"' == blk.buf[i + 1]) { |
if ('"' == blk.buf[i + 1] || '#' == blk.buf[i + 1]) { |
i += 2; |
i += 2; |
/* Comment, skip to end of line */ |
/* Comment, skip to end of line */ |
for (; i < (int)blk.sz; ++i) { |
for (; i < (int)blk.sz; ++i) { |
Line 662 mparse_alloc(enum mparset inttype, enum mandoclevel wl |
|
Line 666 mparse_alloc(enum mparset inttype, enum mandoclevel wl |
|
{ |
{ |
struct mparse *curp; |
struct mparse *curp; |
|
|
|
assert(wlevel <= MANDOCLEVEL_FATAL); |
|
|
curp = mandoc_calloc(1, sizeof(struct mparse)); |
curp = mandoc_calloc(1, sizeof(struct mparse)); |
|
|
curp->wlevel = wlevel; |
curp->wlevel = wlevel; |
|
|
mparse_result(struct mparse *curp, struct mdoc **mdoc, struct man **man) |
mparse_result(struct mparse *curp, struct mdoc **mdoc, struct man **man) |
{ |
{ |
|
|
*mdoc = curp->mdoc; |
if (mdoc) |
*man = curp->man; |
*mdoc = curp->mdoc; |
|
if (man) |
|
*man = curp->man; |
} |
} |
|
|
void |
void |