NASM 2.13.03
[nasm.git] / stdlib / snprintf.c
blob95bfc3147ee4e7d23f0233b1d80fc6f07c384701
1 /*
2 * snprintf()
4 * Implement snprintf() in terms of vsnprintf()
5 */
7 #include "compiler.h"
9 #include <stdio.h>
10 #include <stdlib.h>
11 #include <stdarg.h>
13 #include "nasmlib.h"
15 #if !defined(HAVE_SNPRINTF) && !defined(HAVE__SNPRINTF)
17 int snprintf(char *str, size_t size, const char *format, ...)
19 va_list ap;
20 int rv;
22 va_start(ap, format);
23 rv = vsnprintf(str, size, format, ap);
24 va_end(ap);
26 return rv;
29 #endif