summaryrefslogtreecommitdiffstats
path: root/man_validate.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2009-06-18 10:53:58 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2009-06-18 10:53:58 +0000
commit28dbd78db68ddebbe43fda7d4abefd2d6257d286 (patch)
treeb62ef5f6c371aced00114a58b7dac6bc1feb4498 /man_validate.c
parentebc04fb0a062bcf881ac1fbe0706af873a8fcfc8 (diff)
downloadmandoc-28dbd78db68ddebbe43fda7d4abefd2d6257d286.tar.gz
Moved all formatted libman warn/error into man.c/libman.h.
Converted all formatted warn/errors into regular syntax.
Diffstat (limited to 'man_validate.c')
-rw-r--r--man_validate.c30
1 files changed, 2 insertions, 28 deletions
diff --git a/man_validate.c b/man_validate.c
index 24081eb8..c47a3a07 100644
--- a/man_validate.c
+++ b/man_validate.c
@@ -25,10 +25,6 @@
#define POSTARGS struct man *m, const struct man_node *n
-enum merr {
- WPRINT
-};
-
typedef int (*v_post)(POSTARGS);
struct man_valid {
@@ -42,7 +38,6 @@ static int check_le1(POSTARGS);
static int check_le2(POSTARGS);
static int check_le5(POSTARGS);
static int check_text(POSTARGS);
-static int perr(struct man *, int, int, int, enum merr);
static v_post posts_le1[] = { check_le1, NULL };
static v_post posts_le2[] = { check_le2, NULL };
@@ -106,27 +101,6 @@ man_valid_post(struct man *m)
static int
-perr(struct man *m, int line, int pos,
- int iserr, enum merr type)
-{
- const char *p;
-
- p = NULL;
- switch (type) {
- case (WPRINT):
- p = "invalid character";
- break;
- }
- assert(p);
-
- if (iserr)
- return(man_verr(m, line, pos, p));
-
- return(man_vwarn(m, line, pos, p));
-}
-
-
-static int
check_text(POSTARGS)
{
const char *p;
@@ -139,8 +113,8 @@ check_text(POSTARGS)
continue;
if (MAN_IGN_CHARS & m->pflags)
- return(perr(m, n->line, pos, 0, WPRINT));
- return(perr(m, n->line, pos, 1, WPRINT));
+ return(man_pwarn(m, n->line, pos, WNPRINT));
+ return(man_perr(m, n->line, pos, WNPRINT));
}
return(1);