-#ifndef LIBMANDOC_H
-#define LIBMANDOC_H
-
-__BEGIN_DECLS
-
-int mandoc_special(const char *);
-void *mandoc_calloc(size_t, size_t);
-char *mandoc_strdup(const char *);
-void *mandoc_malloc(size_t);
-void *mandoc_realloc(void *, size_t);
-time_t mandoc_a2time(int, const char *);
-#define MTIME_CANONICAL (1 << 0)
-#define MTIME_REDUCED (1 << 1)
-#define MTIME_MDOCDATE (1 << 2)
-#define MTIME_ISO_8601 (1 << 3)
+
+enum rofferr {
+ ROFF_CONT, /* continue processing line */
+ ROFF_RERUN, /* re-run roff interpreter with offset */
+ ROFF_APPEND, /* re-run main parser, appending next line */
+ ROFF_REPARSE, /* re-run main parser on the result */
+ ROFF_SO, /* include another file */
+ ROFF_IGN, /* ignore current line */
+};
+
+struct buf {
+ char *buf;
+ size_t sz;
+};
+
+
+struct mparse;
+struct roff;
+struct roff_man;
+
+void mandoc_msg(enum mandocerr, struct mparse *,
+ int, int, const char *);
+void mandoc_vmsg(enum mandocerr, struct mparse *,
+ int, int, const char *, ...)
+ __attribute__((__format__ (__printf__, 5, 6)));
+char *mandoc_getarg(struct mparse *, char **, int, int *);
+char *mandoc_normdate(struct roff_man *, char *, int, int);