forked from KnightOS/libc
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathstdio.h
36 lines (29 loc) · 1017 Bytes
/
stdio.h
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
27
28
29
30
31
32
33
34
35
36
#include <stdlib.h>
#include <stdarg.h>
#ifndef __STDIO_H
#define __STDIO_H
/**
* Sends formatted output to a string pointer (*str)
**/
int sprintf(char *str, const char *format, ...);
/**
* Writes formatted output to a character array (*str) up to a maximum amount of characters (size)
**/
int snprintf(char *str, size_t size, const char *format, ...);
/**
* Writes formatted data from a variable arguments list (args) to a character array (*str)
**/
int vsprintf(char *str, const char *format, va_list args);
/**
* Writes formatted data from a variable argument list (args) to a sized buffer (str, size)
**/
int vsnprintf(char *str, size_t size, const char *format, va_list args);
/**
* Same as sprintf but allocates a string large enough to hold the output including the terminating null byte.
**/
int asprintf(char **str, const char *format, ...);
/**
* Same as asprintf but writes formatted data from a variable argument list (args)
**/
int vasprintf(char **str, const char *format, va_list args);
#endif