-enum rew {
- REW_REWIND,
- REW_NOHALT,
- REW_HALT
-};
-
-static int blk_close(MACRO_PROT_ARGS);
-static int blk_exp(MACRO_PROT_ARGS);
-static int blk_imp(MACRO_PROT_ARGS);
-static int in_line_eoln(MACRO_PROT_ARGS);
-
-static int rew_scope(enum man_type,
- struct man *, enum mant);
-static enum rew rew_dohalt(enum mant, enum man_type,
- const struct man_node *);
-static enum rew rew_block(enum mant, enum man_type,
- const struct man_node *);
-static int rew_warn(struct man *,
- struct man_node *, enum mandocerr);
-
-const struct man_macro __man_macros[MAN_MAX] = {
- { in_line_eoln, MAN_NSCOPED }, /* br */
- { in_line_eoln, 0 }, /* TH */
- { blk_imp, MAN_SCOPED }, /* SH */
- { blk_imp, MAN_SCOPED }, /* SS */
- { blk_imp, MAN_SCOPED | MAN_FSCOPED }, /* TP */
- { blk_imp, 0 }, /* LP */
- { blk_imp, 0 }, /* PP */
- { blk_imp, 0 }, /* P */
- { blk_imp, 0 }, /* IP */
- { blk_imp, 0 }, /* HP */
- { in_line_eoln, MAN_SCOPED }, /* SM */
- { in_line_eoln, MAN_SCOPED }, /* SB */
+static void blk_close(MACRO_PROT_ARGS);
+static void blk_exp(MACRO_PROT_ARGS);
+static void blk_imp(MACRO_PROT_ARGS);
+static void in_line_eoln(MACRO_PROT_ARGS);
+static int man_args(struct roff_man *, int,
+ int *, char *, char **);
+static void rew_scope(struct roff_man *, enum roff_tok);
+
+static const struct man_macro man_macros[MAN_MAX - MAN_TH] = {
+ { in_line_eoln, MAN_XSCOPE }, /* TH */
+ { blk_imp, MAN_XSCOPE | MAN_BSCOPED }, /* SH */
+ { blk_imp, MAN_XSCOPE | MAN_BSCOPED }, /* SS */
+ { blk_imp, MAN_XSCOPE | MAN_BSCOPED }, /* TP */
+ { blk_imp, MAN_XSCOPE | MAN_BSCOPED }, /* TQ */
+ { blk_imp, MAN_XSCOPE }, /* LP */
+ { blk_imp, MAN_XSCOPE }, /* PP */
+ { blk_imp, MAN_XSCOPE }, /* P */
+ { blk_imp, MAN_XSCOPE }, /* IP */
+ { blk_imp, MAN_XSCOPE }, /* HP */
+ { in_line_eoln, MAN_NSCOPED | MAN_ESCOPED | MAN_JOIN }, /* SM */
+ { in_line_eoln, MAN_NSCOPED | MAN_ESCOPED | MAN_JOIN }, /* SB */