From 7a6eb8920bdea2ecc151b308352b2a98699b2350 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Fri, 14 Dec 2018 05:18:02 +0000 Subject: 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. --- tbl_data.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'tbl_data.c') diff --git a/tbl_data.c b/tbl_data.c index 687d2d30..ecdf50a0 100644 --- a/tbl_data.c +++ b/tbl_data.c @@ -1,4 +1,4 @@ -/* $Id: tbl_data.c,v 1.50 2018/12/14 01:18:26 schwarze Exp $ */ +/* $Id: tbl_data.c,v 1.51 2018/12/14 05:18:03 schwarze Exp $ */ /* * Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2011, 2015, 2017, 2018 Ingo Schwarze @@ -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 * -- cgit v1.2.3