-static int scope_rewind_exp(struct mdoc *, int, int, int);
-static int scope_rewind_imp(struct mdoc *, int, int);
-static int append_text(struct mdoc *, int,
- int, int, char *[]);
-static int append_scoped(struct mdoc *, int, int, int,
- const char *[], int, const struct mdoc_arg *);
-static int append_delims(struct mdoc *, int, int *, char *);
+static int rewind_alt(int);
+static int rewind_dohalt(int, enum mdoc_type,
+ const struct mdoc_node *);
+#define REWIND_REWIND (1 << 0)
+#define REWIND_NOHALT (1 << 1)
+#define REWIND_HALT (1 << 2)
+static int rewind_dobreak(int, enum mdoc_type,
+ const struct mdoc_node *);
+
+
+static int rewind_elem(struct mdoc *, int);
+static int rewind_impblock(struct mdoc *, int, int, int);
+static int rewind_expblock(struct mdoc *, int, int, int);
+static int rewind_subblock(enum mdoc_type, struct mdoc *, int);
+static int rewind_last(int, int,
+ struct mdoc *, struct mdoc_node *);
+static int append_delims(struct mdoc *,
+ int, int, int *, char *);
+static int lookup(struct mdoc *, int, int, int, const char *);