From 175653a9c22fd3bc8a354401db43a5e93099f079 Mon Sep 17 00:00:00 2001 From: Paul Smith Date: Sat, 23 Nov 2013 22:23:52 -0500 Subject: [SV 40361] Don't use vsnprintf(), which is an ISO C99 function. * output.c (error, fatal, message): Take an extra argument specifying how many bytes are used by the formatted arguments. (get_buffer): New function that allocates the requested buffer size. Remove msc_vsnprintf(), vfmtconcat(), and fmtconcat() as unneeded. * makeint.h: Declare various helper macros for generating output. * *.c: Change all error(), fatal(), message() calls to use the macros, or pass the extra length argument directly. --- expand.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'expand.c') diff --git a/expand.c b/expand.c index ba04e484..28ec198c 100644 --- a/expand.c +++ b/expand.c @@ -121,9 +121,9 @@ recursively_expand_for_file (struct variable *v, struct file *file) { if (!v->exp_count) /* Expanding V causes infinite recursion. Lose. */ - fatal (*expanding_var, - _("Recursive variable '%s' references itself (eventually)"), - v->name); + OS (fatal, *expanding_var, + _("Recursive variable '%s' references itself (eventually)"), + v->name); --v->exp_count; } @@ -266,7 +266,7 @@ variable_expand_string (char *line, const char *string, long length) end = strchr (beg, closeparen); if (end == 0) /* Unterminated variable reference. */ - fatal (*expanding_var, _("unterminated variable reference")); + O (fatal, *expanding_var, _("unterminated variable reference")); p1 = lindex (beg, end, '$'); if (p1 != 0) { -- cgit v1.2.1