summaryrefslogtreecommitdiffstats
path: root/man_argv.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
commitb11413460f4cfc6adeaaec03d30246715922f54d (patch)
tree4836abc5d313954c48af7a9145a26a861f309230 /man_argv.c
parent4123a170dcf7bb0ee57516df099aa6efc10ef5e1 (diff)
downloadmandoc-b11413460f4cfc6adeaaec03d30246715922f54d.tar.gz
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_argv.c')
-rw-r--r--man_argv.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/man_argv.c b/man_argv.c
index 92c46d0e..49b4e6ba 100644
--- a/man_argv.c
+++ b/man_argv.c
@@ -24,6 +24,7 @@
#include <stdlib.h>
#include <string.h>
+#include "mandoc.h"
#include "libman.h"
@@ -57,7 +58,7 @@ man_args(struct man *m, int line, int *pos, char *buf, char **v)
}
if (0 == buf[*pos]) {
- if ( ! man_pwarn(m, line, *pos, WTQUOTE))
+ if ( ! man_pmsg(m, line, *pos, MANDOCERR_BADQUOTE))
return(ARGS_ERROR);
return(ARGS_QWORD);
}
@@ -71,7 +72,7 @@ man_args(struct man *m, int line, int *pos, char *buf, char **v)
(*pos)++;
if (0 == buf[*pos])
- if ( ! man_pwarn(m, line, *pos, WTSPACE))
+ if ( ! man_pmsg(m, line, *pos, MANDOCERR_EOLNSPACE))
return(ARGS_ERROR);
return(ARGS_QWORD);
@@ -95,7 +96,7 @@ man_args(struct man *m, int line, int *pos, char *buf, char **v)
(*pos)++;
if (0 == buf[*pos])
- if ( ! man_pwarn(m, line, *pos, WTSPACE))
+ if ( ! man_pmsg(m, line, *pos, MANDOCERR_EOLNSPACE))
return(ARGS_ERROR);
return(ARGS_WORD);