-
-static int
-pwarn(struct mdoc *m, int line, int pos, enum mwarn type)
-{
- char *p;
- enum mdoc_warn c;
-
- c = WARN_SYNTAX;
- p = NULL;
- switch (type) {
- case (WBADMSEC):
- p = "inappropriate manual section";
- c = WARN_COMPAT;
- break;
- case (WBADSEC):
- p = "inappropriate document section";
- c = WARN_COMPAT;
- break;
- case (WARGVAL):
- p = "argument value suggested";
- c = WARN_COMPAT;
- break;
- case (WPROLREP):
- p = "prologue macros repeated";
- c = WARN_COMPAT;
- break;
- case (WPROLOOO):
- p = "prologue macros out-of-order";
- c = WARN_COMPAT;
- break;
- case (WESCAPE):
- p = "invalid escape sequence";
- break;
- case (WNOLINE):
- p = "suggested no line arguments";
- break;
- case (WLINE):
- p = "suggested line arguments";
- break;
- case (WMULTILINE):
- p = "suggested multi-line arguments";
- break;
- case (WNOMULTILINE):
- p = "suggested no multi-line arguments";
- break;
- case (WWRONGMSEC):
- p = "document section in wrong manual section";
- c = WARN_COMPAT;
- break;
- case (WSECOOO):
- p = "document section out of conventional order";
- break;
- case (WSECREP):
- p = "document section repeated";
- break;
- case (WBADSTAND):
- p = "unknown standard";
- break;
- case (WNAMESECINC):
- p = "NAME section contents incomplete/badly-ordered";
- break;
- }
- assert(p);
- return(mdoc_pwarn(m, line, pos, c, p));
+ if (MDOC_IGN_CHARS & m->pflags)
+ return(mdoc_pwarn(m, ln, pos, EPRINT));
+ return(mdoc_perr(m, ln, pos, EPRINT));