diff options
author | Werner Koch <[email protected]> | 2005-06-01 15:48:03 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2005-06-01 15:48:03 +0000 |
commit | 5703db4d03b1449ef25cfb568efc08bcbb9634b4 (patch) | |
tree | da00873c2e490272f77a9fd9f8fb4804db02074d /gl/asnprintf.c | |
parent | * configure.ac (gl_INIT): Add gnulib stuff. (diff) | |
download | gnupg-5703db4d03b1449ef25cfb568efc08bcbb9634b4.tar.gz gnupg-5703db4d03b1449ef25cfb568efc08bcbb9634b4.zip |
Add stuff from gnulib.
Diffstat (limited to '')
-rw-r--r-- | gl/asnprintf.c | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/gl/asnprintf.c b/gl/asnprintf.c new file mode 100644 index 000000000..1b7f4ba39 --- /dev/null +++ b/gl/asnprintf.c @@ -0,0 +1,37 @@ +/* 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 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 General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 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; +} |