summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Kientzle <kientzle@FreeBSD.org>2008-05-10 06:46:09 +0000
committerTim Kientzle <kientzle@FreeBSD.org>2008-05-10 06:46:09 +0000
commit57b639c4bf0814fb65de987be29e2ad9549b4576 (patch)
tree5cba48edbf44d3bfab59fc88125ba27d94f9dbd2
parentf7843d3ae0a3da5e2ff426af5c8f7e3fe1d071da (diff)
Notes
-rw-r--r--lib/libarchive/archive_string.h3
-rw-r--r--lib/libarchive/archive_string_sprintf.c10
2 files changed, 13 insertions, 0 deletions
diff --git a/lib/libarchive/archive_string.h b/lib/libarchive/archive_string.h
index b9b5352cd6444..271eae3379c11 100644
--- a/lib/libarchive/archive_string.h
+++ b/lib/libarchive/archive_string.h
@@ -116,4 +116,7 @@ void __archive_string_vsprintf(struct archive_string *, const char *,
va_list);
#define archive_string_vsprintf __archive_string_vsprintf
+void __archive_string_sprintf(struct archive_string *, const char *, ...);
+#define archive_string_sprintf __archive_string_sprintf
+
#endif
diff --git a/lib/libarchive/archive_string_sprintf.c b/lib/libarchive/archive_string_sprintf.c
index 4401e9a12773b..44b116eac0af4 100644
--- a/lib/libarchive/archive_string_sprintf.c
+++ b/lib/libarchive/archive_string_sprintf.c
@@ -44,6 +44,16 @@ __FBSDID("$FreeBSD$");
#include "archive_string.h"
#include "archive_private.h"
+void
+__archive_string_sprintf(struct archive_string *as, const char *fmt, ...)
+{
+ va_list ap;
+
+ va_start(ap, fmt);
+ archive_string_vsprintf(as, fmt, ap);
+ va_end(ap);
+}
+
/*
* Like 'vsprintf', but ensures the target is big enough, resizing if
* necessary.