-/*
- * When GCC2 is deprecated, most of these can be reverted to #define
- * as mdoc_vXXX using __VA_ARGS__. Until then, use real functions.
- */
-int mdoc_vwarn(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);