summaryrefslogtreecommitdiffstats
path: root/gettext-runtime/libasprintf
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2003-02-13 21:48:16 +0000
committerBruno Haible <bruno@clisp.org>2009-06-23 12:09:17 +0200
commit05707d5efff3dad5cd4b460545c1a766a23907f9 (patch)
tree3327216108b520743fda0113f053135f31b7cf69 /gettext-runtime/libasprintf
parentff955fae176e5904f2b774a5d66a3b7bb2d059a4 (diff)
downloadexternal_gettext-05707d5efff3dad5cd4b460545c1a766a23907f9.zip
external_gettext-05707d5efff3dad5cd4b460545c1a766a23907f9.tar.gz
external_gettext-05707d5efff3dad5cd4b460545c1a766a23907f9.tar.bz2
Move libasprintf/asnprintf.c to gettext-runtime/libasprintf/asnprintf.c.
Diffstat (limited to 'gettext-runtime/libasprintf')
-rw-r--r--gettext-runtime/libasprintf/asnprintf.c38
1 files changed, 38 insertions, 0 deletions
diff --git a/gettext-runtime/libasprintf/asnprintf.c b/gettext-runtime/libasprintf/asnprintf.c
new file mode 100644
index 0000000..8fb9d3c
--- /dev/null
+++ b/gettext-runtime/libasprintf/asnprintf.c
@@ -0,0 +1,38 @@
+/* Formatted output to strings.
+ Copyright (C) 1999, 2002 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Library General Public License as published
+ by the Free Software Foundation; either version 2, 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
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ USA. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+/* 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;
+}