-static const enum mandocerr mandoclimits[MANDOCLEVEL_MAX] = {
- MANDOCERR_OK,
- MANDOCERR_WARNING,
- MANDOCERR_WARNING,
- MANDOCERR_ERROR,
- MANDOCERR_FATAL,
- MANDOCERR_MAX,
- MANDOCERR_MAX
-};
-
-static const char * const mandocerrs[MANDOCERR_MAX] = {
- "ok",
-
- "generic warning",
-
- "text should be uppercase",
- "sections out of conventional order",
- "section name repeats",
- "out of order prologue",
- "repeated prologue entry",
- "list type must come first",
- "tab in non-literal context",
- "bad escape sequence",
- "unterminated quoted string",
- "argument requires the width argument",
- "superfluous width argument",
- "bad date argument",
- "bad width argument",
- "unknown manual section",
- "section not in conventional manual section",
- "end of line whitespace",
- "blocks badly nested",
-
- "generic error",
-
- "NAME section must come first",
- "bad Boolean value",
- "child violates parent syntax",
- "bad AT&T symbol",
- "bad standard",
- "list type repeated",
- "display type repeated",
- "argument repeated",
- "ignoring argument",
- "manual name not yet set",
- "obsolete macro ignored",
- "empty macro ignored",
- "macro not allowed in body",
- "macro not allowed in prologue",
- "bad character",
- "bad NAME section contents",
- "no blank lines",
- "no text in this context",
- "bad comment style",
- "unknown macro will be lost",
- "NOT IMPLEMENTED: skipping request",
- "line scope broken",
- "argument count wrong",
- "request scope close w/none open",
- "scope already open",
- "scope open on exit",
- "macro requires line argument(s)",
- "macro requires body argument(s)",
- "macro requires argument(s)",
- "no title in document",
- "missing list type",
- "missing display type",
- "missing font type",
- "line argument(s) will be lost",
- "body argument(s) will be lost",
- "paragraph macro ignored",
-
- "generic fatal error",
-
- "column syntax is inconsistent",
- "displays may not be nested",
- "unsupported display type",
- "blocks badly nested",
- "no such block is open",
- "line scope broken, syntax violated",
- "argument count wrong, violates syntax",
- "child violates parent syntax",
- "argument count wrong, violates syntax",
- "no document body",
- "no document prologue",
- "utsname system call failed",
- "static buffer exhausted",
-};
-
-static void fdesc(struct curparse *);
-static void ffile(const char *, struct curparse *);
-static int moptions(enum intt *, char *);
-static int mmsg(enum mandocerr, void *,
- int, int, const char *);
-static void pset(const char *, int, struct curparse *,
- struct man **, struct mdoc **);
+int mandocdb(int, char *[]);
+
+static int fs_lookup(const struct manpaths *,
+ size_t ipath, const char *,
+ const char *, const char *,
+ struct manpage **, size_t *);
+static void fs_search(const struct mansearch *,
+ const struct manpaths *, int, char**,
+ struct manpage **, size_t *);
+static int koptions(int *, char *);
+static int moptions(int *, char *);
+static void mmsg(enum mandocerr, enum mandoclevel,
+ const char *, int, int, const char *);
+static void outdata_alloc(struct curparse *);
+static void parse(struct curparse *, int, const char *);
+static void passthrough(const char *, int, int);
+static pid_t spawn_pager(struct tag_files *);