NASM 2.08rc9
[nasm.git] / lib / snprintf.c
blob01734dcf007f4ec15c67dabf572c79fe015c837c
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 int snprintf(char *str, size_t size, const char *format, ...)
17 va_list ap;
18 int rv;
20 va_start(ap, format);
21 rv = vsnprintf(str, size, format, ap);
22 va_end(ap);
24 return rv;