diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2018-12-14 05:18:02 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2018-12-14 05:18:02 +0000 |
commit | 7a6eb8920bdea2ecc151b308352b2a98699b2350 (patch) | |
tree | 9860a766930f3997c413b0f0aecd6ba815b80f25 /tbl_data.c | |
parent | 0ef6626fcc16277d2fefb32e1830dfba3df5defd (diff) | |
download | mandoc-7a6eb8920bdea2ecc151b308352b2a98699b2350.tar.gz mandoc-7a6eb8920bdea2ecc151b308352b2a98699b2350.tar.zst mandoc-7a6eb8920bdea2ecc151b308352b2a98699b2350.zip |
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.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -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 <kristaps@bsd.lv> * Copyright (c) 2011, 2015, 2017, 2018 Ingo Schwarze <schwarze@openbsd.org> @@ -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 * |