-#define ROFF___ 0
-#define ROFF_Dd 1
-#define ROFF_Dt 2
-#define ROFF_Os 3
-#define ROFF_Sh 4
-#define ROFF_An 5
-#define ROFF_Li 6
-#define ROFF_MAX 7
-
-static int roff_Dd(ROFFCALL_ARGS);
-static int roff_Dt(ROFFCALL_ARGS);
-static int roff_Os(ROFFCALL_ARGS);
-static int roff_Sh(ROFFCALL_ARGS);
-static int roff_An(ROFFCALL_ARGS);
-static int roff_Li(ROFFCALL_ARGS);
-
-static struct roffnode *roffnode_new(int, size_t,
- struct rofftree *);
-static void roffnode_free(int, struct rofftree *);
-
-static int rofffindtok(const char *);
-static int rofffindarg(const char *);
-static int roffargs(int, char *, char **);
-static int roffparse(struct rofftree *, char *, size_t);
-static int textparse(const struct rofftree *,
- const char *, size_t);
-
-static void dbg_enter(const struct md_args *, int);
-static void dbg_leave(const struct md_args *, int);
-
-
-static const struct rofftok tokens[ROFF_MAX] = {
- { "\\\"", NULL, ROFF_COMMENT, 0 },
- { "Dd", roff_Dd, ROFF_TITLE, 0 },
- { "Dt", roff_Dt, ROFF_TITLE, 0 },
- { "Os", roff_Os, ROFF_TITLE, 0 },
- { "Sh", roff_Sh, ROFF_LAYOUT, 0 },
- { "An", roff_An, ROFF_TEXT, ROFF_PARSED },
- { "Li", roff_Li, ROFF_TEXT, ROFF_PARSED | ROFF_CALLABLE },
+static enum rofferr roff_if(ROFF_ARGS);
+static enum rofferr roff_if_text(ROFF_ARGS);
+static enum rofferr roff_ig(ROFF_ARGS);
+static enum rofferr roff_ig_text(ROFF_ARGS);
+static enum rofferr roff_cblock(ROFF_ARGS);
+static enum rofferr roff_ccond(ROFF_ARGS);
+
+const struct roffmac roffs[ROFF_MAX] = {
+ { "if", roff_if, roff_if_text },
+ { "ig", roff_ig, roff_ig_text },
+ { ".", roff_cblock, NULL },
+ { "\\}", roff_ccond, NULL },