summaryrefslogtreecommitdiff
path: root/stdlib/snprintf.c
blob: e4a1c0b507904fa04c0339ce37cf841d1c8fc03b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/*
 * snprintf()
 *
 * Implement snprintf() in terms of vsnprintf()
 */

#include "compiler.h"


#include "nasmlib.h"

#if !defined(HAVE_SNPRINTF) && !defined(HAVE__SNPRINTF)

int snprintf(char *str, size_t size, const char *format, ...)
{
    va_list ap;
    int rv;

    va_start(ap, format);
    rv = vsnprintf(str, size, format, ap);
    va_end(ap);

    return rv;
}

#endif