-/*
- * Callback function for warnings, errors, and fatal errors as they
- * occur in the compilers libroff, libmdoc, and libman.
- */
-typedef int (*mandocmsg)(enum mandocerr, void *,
- int, int, const char *);
+void mparse_free(struct mparse *);
+void mparse_reset(struct mparse *);
+struct mparse *mparse_alloc(enum mparset,
+ enum mandoclevel, mandocmsg, void *);
+enum mandoclevel mparse_readfd(struct mparse *, int, const char *);
+void mparse_result(struct mparse *, struct mdoc **, struct man **);
+const char *mparse_strerror(enum mandocerr);
+const char *mparse_strlevel(enum mandoclevel);
+
+void *mandoc_calloc(size_t, size_t);
+void *mandoc_malloc(size_t);
+void *mandoc_realloc(void *, size_t);
+
+enum mandoc_esc mandoc_escape(const char **, const char **, int *);
+
+struct mchars *mchars_alloc(void);
+char mchars_num2char(const char *, size_t);
+int mchars_num2uc(const char *, size_t);
+const char *mchars_spec2str(struct mchars *, const char *, size_t, size_t *);
+int mchars_spec2cp(struct mchars *, const char *, size_t);
+const char *mchars_res2str(struct mchars *, const char *, size_t, size_t *);
+int mchars_res2cp(struct mchars *, const char *, size_t);
+void mchars_free(struct mchars *);
+