diff options
Diffstat (limited to 'src/stdio/asprintf.c')
-rw-r--r-- | src/stdio/asprintf.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/stdio/asprintf.c b/src/stdio/asprintf.c new file mode 100644 index 0000000..79e59c2 --- /dev/null +++ b/src/stdio/asprintf.c @@ -0,0 +1,14 @@ +#include <stdio.h> +#include <stdarg.h> + +int vasprintf(char **, const char *, va_list); + +int asprintf(char **s, const char *fmt, ...) +{ + int ret; + va_list ap; + va_start(ap, fmt); + ret = vasprintf(s, fmt, ap); + va_end(ap); + return ret; +} |