diff options
Diffstat (limited to 'man_validate.c')
-rw-r--r-- | man_validate.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/man_validate.c b/man_validate.c index 2091840d..76aebe1c 100644 --- a/man_validate.c +++ b/man_validate.c @@ -43,7 +43,6 @@ typedef int (*v_check)(CHKARGS); static int check_eq0(CHKARGS); static int check_eq2(CHKARGS); static int check_le1(CHKARGS); -static int check_ge2(CHKARGS); static int check_le5(CHKARGS); static int check_par(CHKARGS); static int check_part(CHKARGS); @@ -142,7 +141,7 @@ check_root(CHKARGS) man->meta.hasbody = 1; if (NULL == man->meta.title) { - mandoc_msg(MANDOCERR_TH_MISSING, man->parse, + mandoc_msg(MANDOCERR_TH_NOTITLE, man->parse, n->line, n->pos, NULL); /* @@ -150,8 +149,8 @@ check_root(CHKARGS) * implication, date and section also aren't set). */ - man->meta.title = mandoc_strdup("unknown"); - man->meta.msec = mandoc_strdup("1"); + man->meta.title = mandoc_strdup(""); + man->meta.msec = mandoc_strdup(""); man->meta.date = man->quick ? mandoc_strdup("") : mandoc_normdate(man->parse, NULL, n->line, n->pos); } @@ -189,7 +188,6 @@ check_##name(CHKARGS) \ INEQ_DEFINE(0, ==, eq0) INEQ_DEFINE(2, ==, eq2) INEQ_DEFINE(1, <=, le1) -INEQ_DEFINE(2, >=, ge2) INEQ_DEFINE(5, <=, le5) static int @@ -324,7 +322,6 @@ post_TH(CHKARGS) struct man_node *nb; const char *p; - check_ge2(man, n); check_le5(man, n); free(man->meta.title); @@ -354,8 +351,11 @@ post_TH(CHKARGS) } } man->meta.title = mandoc_strdup(n->string); - } else + } else { man->meta.title = mandoc_strdup(""); + mandoc_msg(MANDOCERR_TH_NOTITLE, man->parse, + nb->line, nb->pos, "TH"); + } /* TITLE ->MSEC<- DATE SOURCE VOL */ @@ -363,8 +363,11 @@ post_TH(CHKARGS) n = n->next; if (n && n->string) man->meta.msec = mandoc_strdup(n->string); - else + else { man->meta.msec = mandoc_strdup(""); + mandoc_vmsg(MANDOCERR_MSEC_MISSING, man->parse, + nb->line, nb->pos, "TH %s", man->meta.title); + } /* TITLE MSEC ->DATE<- SOURCE VOL */ |