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. --- mandoc_msg.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'mandoc_msg.c') diff --git a/mandoc_msg.c b/mandoc_msg.c index aa0cce5a..d2ccb91f 100644 --- a/mandoc_msg.c +++ b/mandoc_msg.c @@ -288,8 +288,7 @@ mandoc_msg_setrc(enum mandoclevel level) } void -mandoc_vmsg(enum mandocerr t, void *dummy, int line, int col, - const char *fmt, ...) +mandoc_msg(enum mandocerr t, int line, int col, const char *fmt, ...) { va_list ap; enum mandoclevel level; @@ -324,12 +323,3 @@ mandoc_vmsg(enum mandocerr t, void *dummy, int line, int col, } fputc('\n', fileptr); } - -void -mandoc_msg(enum mandocerr t, void *dummy, int line, int col, const char *msg) -{ - if (msg == NULL) - mandoc_vmsg(t, dummy, line, col, NULL); - else - mandoc_vmsg(t, dummy, line, col, "%s", msg); -} -- cgit v1.2.3-56-ge451