summaryrefslogtreecommitdiffstats
path: root/tbl_data.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2018-12-14 05:18:02 +0000
committerIngo Schwarze <schwarze@openbsd.org>2018-12-14 05:18:02 +0000
commite3863b1460cd9598ecb57705c9b22c2f2c552953 (patch)
treef839c62a271e1da0a9086b6adf22cb9ca99eb7e6 /tbl_data.c
parent62de322fe3ae3638668739b266e3332e94b5acb3 (diff)
downloadmandoc-e3863b1460cd9598ecb57705c9b22c2f2c552953.tar.gz
Almost mechanical diff to remove the "struct mparse *" argument
from mandoc_msg(), where it is no longer used. While here, rename mandoc_vmsg() to mandoc_msg() and retire the old version: There is really no point in having another function merely to save "%s" in a few places. Minus 140 lines of code.
Diffstat (limited to 'tbl_data.c')
-rw-r--r--tbl_data.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/tbl_data.c b/tbl_data.c
index b2d0edef..e289464b 100644
--- a/tbl_data.c
+++ b/tbl_data.c
@@ -77,8 +77,8 @@ getdata(struct tbl_node *tbl, struct tbl_span *dp,
cp->col = dp->layout->last->col + 1;
dp->layout->last = cp;
} else {
- mandoc_msg(MANDOCERR_TBLDATA_EXTRA, tbl->parse,
- ln, sv, p + sv);
+ mandoc_msg(MANDOCERR_TBLDATA_EXTRA,
+ ln, sv, "%s", p + sv);
while (p[*pos] != '\0')
(*pos)++;
return;
@@ -171,7 +171,7 @@ getdata(struct tbl_node *tbl, struct tbl_span *dp,
dat->layout->pos == TBL_CELL_DOWN) &&
dat->pos == TBL_DATA_DATA && *dat->string != '\0')
mandoc_msg(MANDOCERR_TBLDATA_SPAN,
- tbl->parse, ln, sv, dat->string);
+ ln, sv, "%s", dat->string);
}
void
@@ -210,8 +210,8 @@ tbl_cdata(struct tbl_node *tbl, int ln, const char *p, int pos)
dat->string = mandoc_strdup(p + pos);
if (dat->layout->pos == TBL_CELL_DOWN)
- mandoc_msg(MANDOCERR_TBLDATA_SPAN, tbl->parse,
- ln, pos, dat->string);
+ mandoc_msg(MANDOCERR_TBLDATA_SPAN,
+ ln, pos, "%s", dat->string);
}
static struct tbl_span *