aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/man_macro.c
diff options
context:
space:
mode:
Diffstat (limited to 'man_macro.c')
-rw-r--r--man_macro.c32
1 files changed, 15 insertions, 17 deletions
diff --git a/man_macro.c b/man_macro.c
index 89b4e725..7f0cccd7 100644
--- a/man_macro.c
+++ b/man_macro.c
@@ -1,4 +1,4 @@
-/* $Id: man_macro.c,v 1.134 2018/12/14 01:18:25 schwarze Exp $ */
+/* $Id: man_macro.c,v 1.135 2018/12/14 05:18:02 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2012-2015, 2017, 2018 Ingo Schwarze <schwarze@openbsd.org>
@@ -106,8 +106,8 @@ man_unscope(struct roff_man *man, const struct roff_node *to)
if (man->flags & (MAN_BLINE | MAN_ELINE) &&
man_macro(n->tok)->flags &
(MAN_BSCOPED | MAN_NSCOPED)) {
- mandoc_vmsg(MANDOCERR_BLK_LINE,
- man->parse, n->line, n->pos,
+ mandoc_msg(MANDOCERR_BLK_LINE,
+ n->line, n->pos,
"EOF breaks %s", roff_name[n->tok]);
if (man->flags & MAN_ELINE)
man->flags &= ~MAN_ELINE;
@@ -124,7 +124,7 @@ man_unscope(struct roff_man *man, const struct roff_node *to)
if (n->type == ROFFT_BLOCK &&
man_macro(n->tok)->fp == blk_exp)
mandoc_msg(MANDOCERR_BLK_NOEND,
- man->parse, n->line, n->pos,
+ n->line, n->pos, "%s",
roff_name[n->tok]);
}
@@ -216,13 +216,13 @@ blk_close(MACRO_PROT_ARGS)
nrew++;
target = strtol(p, &p, 10);
if (*p != '\0')
- mandoc_vmsg(MANDOCERR_ARG_EXCESS, man->parse,
- line, p - buf, "RE ... %s", p);
+ mandoc_msg(MANDOCERR_ARG_EXCESS, line,
+ (int)(p - buf), "RE ... %s", p);
if (target == 0)
target = 1;
nrew -= target;
if (nrew < 1) {
- mandoc_vmsg(MANDOCERR_RE_NOTOPEN, man->parse,
+ mandoc_msg(MANDOCERR_RE_NOTOPEN,
line, ppos, "RE %d", target);
return;
}
@@ -245,8 +245,8 @@ blk_close(MACRO_PROT_ARGS)
break;
if (nn == NULL) {
- mandoc_msg(MANDOCERR_BLK_NOTOPEN, man->parse,
- line, ppos, roff_name[tok]);
+ mandoc_msg(MANDOCERR_BLK_NOTOPEN,
+ line, ppos, "%s", roff_name[tok]);
rew_scope(man, MAN_PP);
if (tok == MAN_RE) {
roff_elem_alloc(man, line, ppos, ROFF_br);
@@ -315,8 +315,8 @@ blk_exp(MACRO_PROT_ARGS)
}
if (buf[*pos] != '\0')
- mandoc_vmsg(MANDOCERR_ARG_EXCESS, man->parse, line,
- *pos, "%s ... %s", roff_name[tok], buf + *pos);
+ mandoc_msg(MANDOCERR_ARG_EXCESS, line, *pos,
+ "%s ... %s", roff_name[tok], buf + *pos);
man_unscope(man, head);
roff_body_alloc(man, line, ppos, tok);
@@ -380,15 +380,13 @@ in_line_eoln(MACRO_PROT_ARGS)
for (;;) {
if (buf[*pos] != '\0' && (tok == MAN_fi || tok == MAN_nf)) {
- mandoc_vmsg(MANDOCERR_ARG_SKIP,
- man->parse, line, *pos, "%s %s",
- roff_name[tok], buf + *pos);
+ mandoc_msg(MANDOCERR_ARG_SKIP, line, *pos,
+ "%s %s", roff_name[tok], buf + *pos);
break;
}
if (buf[*pos] != '\0' && man->last != n && tok == MAN_PD) {
- mandoc_vmsg(MANDOCERR_ARG_EXCESS,
- man->parse, line, *pos, "%s ... %s",
- roff_name[tok], buf + *pos);
+ mandoc_msg(MANDOCERR_ARG_EXCESS, line, *pos,
+ "%s ... %s", roff_name[tok], buf + *pos);
break;
}
la = *pos;