summaryrefslogtreecommitdiffstats
path: root/man_macro.c
diff options
context:
space:
mode:
Diffstat (limited to 'man_macro.c')
-rw-r--r--man_macro.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/man_macro.c b/man_macro.c
index 87832e1c..518b1e8e 100644
--- a/man_macro.c
+++ b/man_macro.c
@@ -18,7 +18,6 @@
*/
#include <assert.h>
#include <ctype.h>
-#include <err.h> /* XXX */
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -113,7 +112,7 @@ man_macroend(struct man *m)
/* ARGSUSED */
static int
-man_args(struct man *man, int line,
+man_args(struct man *m, int line,
int *pos, char *buf, char **v)
{
@@ -146,8 +145,10 @@ man_args(struct man *man, int line,
if (buf[*pos])
return(1);
- warnx("tail whitespace");
- return(-1);
+ if ( ! man_vwarn(m, line, *pos, "trailing spaces"))
+ return(-1);
+
+ return(1);
}
/*
@@ -162,8 +163,9 @@ man_args(struct man *man, int line,
(*pos)++;
if (0 == buf[*pos]) {
- warnx("unterminated quotation");
- return(-1);
+ if ( ! man_vwarn(m, line, *pos, "unterminated quote"))
+ return(-1);
+ return(1);
}
buf[(*pos)++] = 0;
@@ -176,6 +178,7 @@ man_args(struct man *man, int line,
if (buf[*pos])
return(1);
- warnx("tail whitespace");
- return(-1);
+ if ( ! man_vwarn(m, line, *pos, "trailing spaces"))
+ return(-1);
+ return(1);
}