1 | /* |
---|---|
2 | * snprintf() |
3 | * |
4 | * Implement snprintf() in terms of vsnprintf() |
5 | */ |
6 | |
7 | #include "compiler.h" |
8 | |
9 | #include <stdio.h> |
10 | #include <stdlib.h> |
11 | #include <stdarg.h> |
12 | |
13 | #include "nasmlib.h" |
14 | |
15 | #if !defined(HAVE_SNPRINTF) && !defined(HAVE__SNPRINTF) |
16 | |
17 | int snprintf(char *str, size_t size, const char *format, ...) |
18 | { |
19 | va_list ap; |
20 | int rv; |
21 | |
22 | va_start(ap, format); |
23 | rv = vsnprintf(str, size, format, ap); |
24 | va_end(ap); |
25 | |
26 | return rv; |
27 | } |
28 | |
29 | #endif |
30 |