aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/man_action.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2010-05-17 22:11:42 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2010-05-17 22:11:42 +0000
commit95356d6189f5e5d41011a7cb60176f147e1fff7d (patch)
treec923ce026d6b8f420d203f151868c8b858e4501d /man_action.c
parent114426748445942cb51394e59f2c62ad79bd974c (diff)
downloadmandoc-95356d6189f5e5d41011a7cb60176f147e1fff7d.tar.gz
mandoc-95356d6189f5e5d41011a7cb60176f147e1fff7d.tar.zst
mandoc-95356d6189f5e5d41011a7cb60176f147e1fff7d.zip
Enable the unified error/warning enumeration in mandoc.h that's
stringified in main.c. Allow `An' to handle an argument and child (with a warning). Allow `Rv' and `Ex' to work without a prior `Nm' as groff does (with a warning). Allow inconsistent column syntax to only raise a warning.
Diffstat (limited to 'man_action.c')
-rw-r--r--man_action.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/man_action.c b/man_action.c
index 140f360f..55fe11fd 100644
--- a/man_action.c
+++ b/man_action.c
@@ -1,4 +1,4 @@
-/* $Id: man_action.c,v 1.35 2010/05/17 10:50:32 joerg Exp $ */
+/* $Id: man_action.c,v 1.36 2010/05/17 22:11:42 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -22,6 +22,7 @@
#include <stdlib.h>
#include <string.h>
+#include "mandoc.h"
#include "libman.h"
#include "libmandoc.h"
@@ -103,7 +104,7 @@ post_fi(struct man *m)
{
if ( ! (MAN_LITERAL & m->flags))
- if ( ! man_nwarn(m, m->last, WNLITERAL))
+ if ( ! man_nmsg(m, m->last, MANDOCERR_NOSCOPE))
return(0);
m->flags &= ~MAN_LITERAL;
return(1);
@@ -115,7 +116,7 @@ post_nf(struct man *m)
{
if (MAN_LITERAL & m->flags)
- if ( ! man_nwarn(m, m->last, WOLITERAL))
+ if ( ! man_nmsg(m, m->last, MANDOCERR_SCOPEREP))
return(0);
m->flags |= MAN_LITERAL;
return(1);
@@ -159,7 +160,7 @@ post_TH(struct man *m)
m->meta.date = mandoc_a2time
(MTIME_ISO_8601, n->string);
if (0 == m->meta.date) {
- if ( ! man_nwarn(m, n, WDATE))
+ if ( ! man_nmsg(m, n, MANDOCERR_BADDATE))
return(0);
m->meta.date = time(NULL);
}