-static void inoadd(const struct stat *, struct of *);
-static int inocheck(const struct stat *);
-static void ofadd(int, const char *, const char *, const char *,
- const char *, const char *, const struct stat *);
-static void offree(void);
-static void ofmerge(struct mchars *, struct mparse *,
- struct ohash_info*, int);
-static void parse_catpage(struct of *);
-static void parse_man(struct of *, const struct man_node *);
-static void parse_mdoc(struct of *, const struct mdoc_node *);
-static int parse_mdoc_body(struct of *, const struct mdoc_node *);
-static int parse_mdoc_head(struct of *, const struct mdoc_node *);
-static int parse_mdoc_Fd(struct of *, const struct mdoc_node *);
-static int parse_mdoc_Fn(struct of *, const struct mdoc_node *);
-static int parse_mdoc_In(struct of *, const struct mdoc_node *);
-static int parse_mdoc_Nd(struct of *, const struct mdoc_node *);
-static int parse_mdoc_Nm(struct of *, const struct mdoc_node *);
-static int parse_mdoc_Sh(struct of *, const struct mdoc_node *);
-static int parse_mdoc_St(struct of *, const struct mdoc_node *);
-static int parse_mdoc_Xr(struct of *, const struct mdoc_node *);
-static int set_basedir(const char *);
-static void putkey(const struct of *,
+static void mlink_add(struct mlink *, const struct stat *);
+static void mlink_free(struct mlink *);
+static void mlinks_undupe(struct mpage *);
+static void mpages_free(void);
+static void mpages_merge(struct mchars *, struct mparse *, int);
+static void parse_cat(struct mpage *);
+static void parse_man(struct mpage *, const struct man_node *);
+static void parse_mdoc(struct mpage *, const struct mdoc_node *);
+static int parse_mdoc_body(struct mpage *, const struct mdoc_node *);
+static int parse_mdoc_head(struct mpage *, const struct mdoc_node *);
+static int parse_mdoc_Fd(struct mpage *, const struct mdoc_node *);
+static int parse_mdoc_Fn(struct mpage *, const struct mdoc_node *);
+static int parse_mdoc_Nd(struct mpage *, const struct mdoc_node *);
+static int parse_mdoc_Nm(struct mpage *, const struct mdoc_node *);
+static int parse_mdoc_Sh(struct mpage *, const struct mdoc_node *);
+static int parse_mdoc_Xr(struct mpage *, const struct mdoc_node *);
+static void putkey(const struct mpage *,