+static int
+perr(struct mdoc *mdoc, int line, int pos, int code)
+{
+ int c;
+
+ switch (code) {
+ case (EQUOTTERM):
+ c = mdoc_perr(mdoc, line, pos,
+ "unterminated quoted parameter");
+ break;
+ case (EARGVAL):
+ c = mdoc_perr(mdoc, line, pos,
+ "argument requires a value");
+ break;
+ case (EARGMANY):
+ c = mdoc_perr(mdoc, line, pos,
+ "too many values for argument");
+ break;
+ default:
+ abort();
+ /* NOTREACHED */
+ }
+ return(c);
+}
+
+
+static int
+pwarn(struct mdoc *mdoc, int line, int pos, int code)
+{
+ int c;
+
+ switch (code) {
+ case (WQUOTPARM):
+ c = mdoc_pwarn(mdoc, line, pos, WARN_SYNTAX,
+ "unexpected quoted parameter");
+ break;
+ case (WARGVPARM):
+ c = mdoc_pwarn(mdoc, line, pos, WARN_SYNTAX,
+ "argument-like parameter");
+ break;
+ case (WCOLEMPTY):
+ c = mdoc_pwarn(mdoc, line, pos, WARN_SYNTAX,
+ "last list column is empty");
+ break;
+ case (WTAILWS):
+ c = mdoc_pwarn(mdoc, line, pos, WARN_COMPAT,
+ "trailing whitespace");
+ break;
+ default:
+ abort();
+ /* NOTREACHED */
+ }
+ return(c);
+}
+
+