summaryrefslogtreecommitdiff
path: root/os/src/sprintf.c
blob: 755d780d803fed0d61c8df1f418f5f81e4303673 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include <reent.h>
#include <stdio.h>
#include <stdarg.h>
#include <osdebug.h>

int sprintf(char * str, const char * fmt, ...) {
    int r;
    va_list ap;
//    DBGOUT("sprintf(%p, %p, ...)\r\n", str, fmt);
    va_start(ap, fmt);
    r = _vsprintf_r(_impure_ptr, str, fmt, ap);
    va_end(ap);
    return r;
}