=================================================================== RCS file: /cvs/mandoc/main.c,v retrieving revision 1.155 retrieving revision 1.159 diff -u -p -r1.155 -r1.159 --- mandoc/main.c 2011/03/20 16:02:05 1.155 +++ mandoc/main.c 2011/03/23 09:47:13 1.159 @@ -1,4 +1,4 @@ -/* $Id: main.c,v 1.155 2011/03/20 16:02:05 kristaps Exp $ */ +/* $Id: main.c,v 1.159 2011/03/23 09:47:13 kristaps Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2010, 2011 Ingo Schwarze @@ -30,7 +30,6 @@ #include "main.h" #include "mdoc.h" #include "man.h" -#include "roff.h" #if !defined(__GNUC__) || (__GNUC__ < 2) # if !defined(lint) @@ -54,7 +53,6 @@ enum outt { struct curparse { struct mparse *mp; - const char *file; /* current file-name */ enum mandoclevel wlevel; /* ignore messages below this */ int wstop; /* stop after a file with a warning */ enum outt outtype; /* which output to use */ @@ -108,6 +106,7 @@ static const char * const mandocerrs[MANDOCERR_MAX] = "child violates parent syntax", "nested displays are not portable", "already in literal mode", + "line scope broken", /* related to missing macro arguments */ "skipping empty macro", @@ -155,7 +154,6 @@ static const char * const mandocerrs[MANDOCERR_MAX] = "skipping text before the first section header", "skipping unknown macro", "NOT IMPLEMENTED, please use groff: skipping request", - "line scope broken", "argument count wrong", "skipping end of block that is not open", "missing end of block", @@ -170,6 +168,7 @@ static const char * const mandocerrs[MANDOCERR_MAX] = "generic fatal error", + "not a manual", "column syntax is inconsistent", "NOT IMPLEMENTED: .Bd -file", "line scope broken, syntax violated", @@ -182,8 +181,6 @@ static const char * const mandocerrs[MANDOCERR_MAX] = "static buffer exhausted", }; -static void evt_close(void *, const char *); -static int evt_open(void *, const char *); static int moptions(enum mparset *, char *); static void mmsg(enum mandocerr, enum mandoclevel, const char *, int, int, const char *); @@ -243,7 +240,7 @@ main(int argc, char *argv[]) /* NOTREACHED */ } - curp.mp = mparse_alloc(type, evt_open, evt_close, curp.wlevel, mmsg, &curp); + curp.mp = mparse_alloc(type, curp.wlevel, mmsg, &curp); argc -= optind; argv += optind; @@ -291,23 +288,6 @@ usage(void) progname); exit((int)MANDOCLEVEL_BADARG); -} - -static int -evt_open(void *arg, const char *file) -{ - - evt_close(arg, file); - return(1); -} - -static void -evt_close(void *arg, const char *file) -{ - struct curparse *p; - - p = (struct curparse *)arg; - p->file = file; } static void