-static int
-perr(struct mdoc *m, int line, int pos, enum merr type)
-{
- char *p;
-
- p = NULL;
- switch (type) {
- case (ENUMFMT):
- p = "bad number format";
- break;
- case (ETOOLONG):
- p = "argument text too long";
- break;
- case (EUTSNAME):
- p = "utsname";
- break;
- case (EMALLOC):
- p = "memory exhausted";
- break;
- }
- assert(p);
- return(mdoc_perr(m, line, pos, p));
-}
-
-
-static int
-pwarn(struct mdoc *m, int line, int pos, enum mwarn type)
-{
- char *p;
- int c;
-
- p = NULL;
- c = WARN_SYNTAX;
- switch (type) {
- case (WBADSEC):
- p = "inappropriate document section in manual section";
- c = WARN_COMPAT;
- break;
- case (WNOWIDTH):
- p = "cannot determine default width";
- break;
- case (WBADDATE):
- p = "malformed date syntax";
- break;
- }
- assert(p);
- return(mdoc_pwarn(m, line, pos, c, p));
-}
-
-