MOS Source Code
Loading...
Searching...
No Matches
mos_stdio.c
Go to the documentation of this file.
1// SPDX-License-Identifier: GPL-3.0-or-later
2
3#include "mos_stdio.h"
4
5#include <limits.h>
6
7int sprintf(char *__restrict str, const char *__restrict format, ...)
8{
9 va_list args;
10 va_start(args, format);
11 int ret = vsprintf(str, format, args);
12 va_end(args);
13 return ret;
14}
15
16int snprintf(char *__restrict str, size_t size, const char *__restrict format, ...)
17{
18 va_list args;
19 va_start(args, format);
20 int ret = vsnprintf(str, size, format, args);
21 va_end(args);
22 return ret;
23}
24
25int vsprintf(char *__restrict str, const char *__restrict format, va_list ap)
26{
27 return vsnprintf(str, INT_MAX, format, ap);
28}
char args[3][16]
Definition avr_io.c:16
MOSAPI int vsnprintf(char *__restrict buf, size_t size, const char *__restrict format, va_list args)
int vsprintf(char *__restrict str, const char *__restrict format, va_list ap)
Definition mos_stdio.c:25
MOSAPI const char *__restrict format
Definition mos_stdio.h:17
int sprintf(char *__restrict str, const char *__restrict format,...)
Definition mos_stdio.c:7
int snprintf(char *__restrict str, size_t size, const char *__restrict format,...)
Definition mos_stdio.c:16
size_t size
Definition slab.c:30