-/*
- * When GCC2 is deprecated, most of these can be reverted to #define
- * as mdoc_vmsg using __VA_ARGS__. Until then, use real functions.
- */
-int mdoc_vwarn(struct mdoc *, int, int,
- enum mdoc_warn, const char *, ...);
-void mdoc_vmsg(struct mdoc *, int, int,
- const char *, ...);
-int mdoc_verr(struct mdoc *, int, int,
- const char *, ...);
-int mdoc_nwarn(struct mdoc *, const struct mdoc_node *,
- enum mdoc_warn, const char *, ...);
-int mdoc_nerr(struct mdoc *, const struct mdoc_node *,
- const char *, ...);
-int mdoc_warn(struct mdoc *, enum mdoc_warn, const char *, ...);
-int mdoc_err(struct mdoc *, const char *, ...);
-void mdoc_msg(struct mdoc *, const char *, ...);
-void mdoc_pmsg(struct mdoc *, int, int, const char *, ...);
-int mdoc_pwarn(struct mdoc *, int, int,
- enum mdoc_warn,const char *, ...);
-int mdoc_perr(struct mdoc *, int, int, const char *, ...);
+#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 *, ...);
+