summaryrefslogtreecommitdiff
path: root/src/gl/asnprintf.c
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@redhat.com>2014-03-04 12:11:30 +0100
committerNikos Mavrogiannopoulos <nmav@redhat.com>2014-03-04 12:11:30 +0100
commit16aa9ebea89c88fa4f253d1fef46575629d6c4d2 (patch)
tree061cf391888515d32a3b3c2d520820c4952cf130 /src/gl/asnprintf.c
parent77d2dca98d17f86fedefdca54b1175019f8f8ffa (diff)
downloadgnutls-16aa9ebea89c88fa4f253d1fef46575629d6c4d2.tar.gz
All socket options were moved to src/gl
Diffstat (limited to 'src/gl/asnprintf.c')
-rw-r--r--src/gl/asnprintf.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/gl/asnprintf.c b/src/gl/asnprintf.c
new file mode 100644
index 0000000000..0c62197f79
--- /dev/null
+++ b/src/gl/asnprintf.c
@@ -0,0 +1,34 @@
+/* Formatted output to strings.
+ Copyright (C) 1999, 2002, 2006, 2009-2014 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include "vasnprintf.h"
+
+#include <stdarg.h>
+
+char *
+asnprintf (char *resultbuf, size_t *lengthp, const char *format, ...)
+{
+ va_list args;
+ char *result;
+
+ va_start (args, format);
+ result = vasnprintf (resultbuf, lengthp, format, args);
+ va_end (args);
+ return result;
+}