-static int foptions(int *, char *);
-static int toptions(enum outt *, char *);
-static int moptions(enum intt *, char *);
-static int woptions(int *, char *);
-static int merr(void *, int, int, const char *);
-static int mwarn(void *, int, int, const char *);
-static int ffile(struct buf *, struct buf *,
- const char *, struct curparse *);
-static int fdesc(struct buf *, struct buf *,
- struct curparse *);
-static int pset(const char *, int, struct curparse *,
- struct man **, struct mdoc **);
-static struct man *man_init(struct curparse *);
-static struct mdoc *mdoc_init(struct curparse *);
-__dead static void version(void);
-__dead static void usage(void);
+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 *);
+#if HAVE_SQLITE3
+int mandocdb(int, char**);
+#endif
+static int moptions(int *, char *);
+static void mmsg(enum mandocerr, enum mandoclevel,
+ const char *, int, int, const char *);
+static void parse(struct curparse *, int, const char *);
+static void passthrough(const char *, int, int);
+static pid_t spawn_pager(struct tag_files *);
+static int toptions(struct curparse *, char *);
+static void usage(enum argmode) __attribute__((noreturn));
+static int woptions(struct curparse *, char *);