-extern const struct mdoc_macro *const mdoc_macros;
-
-__BEGIN_DECLS
-
-#define mdoc_perr(m, l, p, t) \
- mdoc_err((m), (l), (p), 1, (t))
-#define mdoc_pwarn(m, l, p, t) \
- mdoc_err((m), (l), (p), 0, (t))
-#define mdoc_nerr(m, n, t) \
- mdoc_err((m), (n)->line, (n)->pos, 1, (t))
-#define mdoc_nwarn(m, n, t) \
- mdoc_err((m), (n)->line, (n)->pos, 0, (t))
-
-int mdoc_err(struct mdoc *, int, int, int, enum merr);
-int mdoc_verr(struct mdoc *, int, int, const char *, ...);
-int mdoc_vwarn(struct mdoc *, int, int, const char *, ...);
-
-int mdoc_macro(MACRO_PROT_ARGS);
-int mdoc_word_alloc(struct mdoc *,
- int, int, const char *);
-int mdoc_elem_alloc(struct mdoc *, int, int,
- enum mdoct, struct mdoc_arg *);
-int mdoc_block_alloc(struct mdoc *, int, int,
- enum mdoct, struct mdoc_arg *);
-int mdoc_head_alloc(struct mdoc *, int, int, enum mdoct);
-int mdoc_tail_alloc(struct mdoc *, int, int, enum mdoct);
-int mdoc_body_alloc(struct mdoc *, int, int, enum mdoct);
-void mdoc_node_delete(struct mdoc *, struct mdoc_node *);
-void mdoc_hash_init(void);
-enum mdoct mdoc_hash_find(const char *);
-int mdoc_iscdelim(char);
-int mdoc_isdelim(const char *);
-size_t mdoc_isescape(const char *);
-enum mdoc_sec mdoc_atosec(const char *);
-time_t mdoc_atotime(const char *);
-size_t mdoc_macro2len(enum mdoct);
+const struct mdoc_macro *mdoc_macro(enum roff_tok);
+
+void mdoc_elem_alloc(struct roff_man *, int, int,
+ enum roff_tok, struct mdoc_arg *);
+struct roff_node *mdoc_block_alloc(struct roff_man *, int, int,
+ enum roff_tok, struct mdoc_arg *);
+void mdoc_tail_alloc(struct roff_man *, int, int,
+ enum roff_tok);
+struct roff_node *mdoc_endbody_alloc(struct roff_man *, int, int,
+ enum roff_tok, struct roff_node *);
+void mdoc_state(struct roff_man *, struct roff_node *);
+const char *mdoc_a2arch(const char *);