version 1.155, 2011/03/20 16:02:05 |
version 1.159, 2011/03/23 09:47:13 |
|
|
#include "main.h" |
#include "main.h" |
#include "mdoc.h" |
#include "mdoc.h" |
#include "man.h" |
#include "man.h" |
#include "roff.h" |
|
|
|
#if !defined(__GNUC__) || (__GNUC__ < 2) |
#if !defined(__GNUC__) || (__GNUC__ < 2) |
# if !defined(lint) |
# if !defined(lint) |
|
|
|
|
struct curparse { |
struct curparse { |
struct mparse *mp; |
struct mparse *mp; |
const char *file; /* current file-name */ |
|
enum mandoclevel wlevel; /* ignore messages below this */ |
enum mandoclevel wlevel; /* ignore messages below this */ |
int wstop; /* stop after a file with a warning */ |
int wstop; /* stop after a file with a warning */ |
enum outt outtype; /* which output to use */ |
enum outt outtype; /* which output to use */ |
Line 108 static const char * const mandocerrs[MANDOCERR_MAX] = |
|
Line 106 static const char * const mandocerrs[MANDOCERR_MAX] = |
|
"child violates parent syntax", |
"child violates parent syntax", |
"nested displays are not portable", |
"nested displays are not portable", |
"already in literal mode", |
"already in literal mode", |
|
"line scope broken", |
|
|
/* related to missing macro arguments */ |
/* related to missing macro arguments */ |
"skipping empty macro", |
"skipping empty macro", |
Line 155 static const char * const mandocerrs[MANDOCERR_MAX] = |
|
Line 154 static const char * const mandocerrs[MANDOCERR_MAX] = |
|
"skipping text before the first section header", |
"skipping text before the first section header", |
"skipping unknown macro", |
"skipping unknown macro", |
"NOT IMPLEMENTED, please use groff: skipping request", |
"NOT IMPLEMENTED, please use groff: skipping request", |
"line scope broken", |
|
"argument count wrong", |
"argument count wrong", |
"skipping end of block that is not open", |
"skipping end of block that is not open", |
"missing end of block", |
"missing end of block", |
Line 170 static const char * const mandocerrs[MANDOCERR_MAX] = |
|
Line 168 static const char * const mandocerrs[MANDOCERR_MAX] = |
|
|
|
"generic fatal error", |
"generic fatal error", |
|
|
|
"not a manual", |
"column syntax is inconsistent", |
"column syntax is inconsistent", |
"NOT IMPLEMENTED: .Bd -file", |
"NOT IMPLEMENTED: .Bd -file", |
"line scope broken, syntax violated", |
"line scope broken, syntax violated", |
Line 182 static const char * const mandocerrs[MANDOCERR_MAX] = |
|
Line 181 static const char * const mandocerrs[MANDOCERR_MAX] = |
|
"static buffer exhausted", |
"static buffer exhausted", |
}; |
}; |
|
|
static void evt_close(void *, const char *); |
|
static int evt_open(void *, const char *); |
|
static int moptions(enum mparset *, char *); |
static int moptions(enum mparset *, char *); |
static void mmsg(enum mandocerr, enum mandoclevel, |
static void mmsg(enum mandocerr, enum mandoclevel, |
const char *, int, int, const char *); |
const char *, int, int, const char *); |
Line 243 main(int argc, char *argv[]) |
|
Line 240 main(int argc, char *argv[]) |
|
/* NOTREACHED */ |
/* 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; |
argc -= optind; |
argv += optind; |
argv += optind; |
|
|
progname); |
progname); |
|
|
exit((int)MANDOCLEVEL_BADARG); |
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 |
static void |