-static void fdesc(struct curparse *);
-static void ffile(const char *, struct curparse *);
-static int foptions(int *, char *);
-static struct man *man_init(struct curparse *);
-static struct mdoc *mdoc_init(struct curparse *);
-static struct roff *roff_init(struct curparse *);
-static int merr(void *, int, int, const char *); /* DEPRECATED */
-static int moptions(enum intt *, char *);
-static int mwarn(void *, int, int, const char *); /* DEPRECATED */
-static int mmsg(enum mandocerr, void *,
- int, int, const char *);
-static int pset(const char *, int, struct curparse *,
- struct man **, struct mdoc **);
+
+int mandocdb(int, char *[]);
+
+static void check_xr(const char *);
+static int fs_lookup(const struct manpaths *,
+ size_t ipath, const char *,
+ const char *, const char *,
+ struct manpage **, size_t *);
+static int fs_search(const struct mansearch *,
+ const struct manpaths *, int, char**,
+ struct manpage **, size_t *);
+static int koptions(int *, char *);
+static void 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 *);