summaryrefslogtreecommitdiff
path: root/ar.c
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2013-11-23 22:23:52 -0500
committerPaul Smith <psmith@gnu.org>2013-11-23 22:23:52 -0500
commit757849cd93a9bc361a5113e3aaafe516773aad44 (patch)
treed6acd1705fe25873b43fa7d16b736e44b6191ab7 /ar.c
parent9d58570c77240fed53d1f88217877f8e778f4bb2 (diff)
downloadgunmake-757849cd93a9bc361a5113e3aaafe516773aad44.tar.gz
[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.
Diffstat (limited to 'ar.c')
-rw-r--r--ar.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/ar.c b/ar.c
index afed591..5d2f000 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);