diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2010-05-17 22:11:42 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2010-05-17 22:11:42 +0000 |
commit | 95356d6189f5e5d41011a7cb60176f147e1fff7d (patch) | |
tree | c923ce026d6b8f420d203f151868c8b858e4501d /man_argv.c | |
parent | 114426748445942cb51394e59f2c62ad79bd974c (diff) | |
download | mandoc-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_argv.c')
-rw-r--r-- | man_argv.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -1,4 +1,4 @@ -/* $Id: man_argv.c,v 1.2 2010/01/01 17:14:28 kristaps Exp $ */ +/* $Id: man_argv.c,v 1.3 2010/05/17 22:11:42 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se> * @@ -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); |