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. --- ar.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'ar.c') diff --git a/ar.c b/ar.c index afed591f..5d2f0009 100644 --- a/ar.c +++ b/ar.c @@ -43,7 +43,7 @@ ar_name (const char *name) return 0; if (p[1] == '(' && end[-1] == ')') - fatal (NILF, _("attempt to use unsupported feature: '%s'"), name); + OS (fatal, NILF, _("attempt to use unsupported feature: '%s'"), name); return 1; } @@ -120,7 +120,7 @@ ar_member_date (const char *name) int ar_touch (const char *name) { - error (NILF, _("touch archive member is not available on VMS")); + O (error, NILF, _("touch archive member is not available on VMS")); return -1; } #else @@ -144,24 +144,24 @@ ar_touch (const char *name) switch (ar_member_touch (arname, memname)) { case -1: - error (NILF, _("touch: Archive '%s' does not exist"), arname); + OS (error, NILF, _("touch: Archive '%s' does not exist"), arname); break; case -2: - error (NILF, _("touch: '%s' is not a valid archive"), arname); + OS (error, NILF, _("touch: '%s' is not a valid archive"), arname); break; case -3: perror_with_name ("touch: ", arname); break; case 1: - error (NILF, - _("touch: Member '%s' does not exist in '%s'"), memname, arname); + OSS (error, NILF, + _("touch: Member '%s' does not exist in '%s'"), memname, arname); break; case 0: val = 0; break; default: - error (NILF, - _("touch: Bad return code from ar_member_touch on '%s'"), name); + OS (error, NILF, + _("touch: Bad return code from ar_member_touch on '%s'"), name); } free (arname); -- cgit v1.2.1