| Samsung Internal API reference 2.0

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- File List
- Globals

stdio.h
Go to the documentation of this file.
1
9 #ifndef __STDIO_H__
10 #define __STDIO_H__
11
12 #ifdef __cplusplus
13 extern "C" {
14 #endif
15
16 #include <compiler.h>
17 #include <stdarg.h>
18 #include <stdint.h>
19 #include <stddef.h>
20
25 #ifndef EOF
26 #define EOF (-1)
27 #endif
28
30 typedef struct FILE FILE;
34 extern FILE *stdin;
35
37 extern FILE *stdout;
38
40 extern FILE *stderr;
41
64 extern int printf(const char *fmt, ...)
65 __attribute__ ((format (printf, 1, 2)));
66
79 extern int fprintf(FILE *_restrict_ stream, const char *_restrict_ fmt, ...)
80 __attribute__ ((format (printf, 2, 3)));
81
91 extern int vfprintf(FILE *_restrict_ stream, const char *_restrict_ fmt, va_list ap);
92
99 extern int fflush(FILE *stream);
100
117 extern int sprintf(char *s, const char *fmt, ...)
118 __attribute__ ((format (printf, 2, 3)));
119
120 #ifdef __STDC_WANT_LIB_EXT1__
121
128 extern int printf_s(const char * _restrict_ fmt, ...)
129 __attribute__ ((format (printf, 1, 2)));
130
142 extern int vsprintf_s(char * _restrict_ s, rsize_t n, const char * _restrict_ format, va_list arg);
143
157 extern int vsnprintf_s(char * _restrict_ s, rsize_t n, const char * _restrict_ format, va_list arg);
158
170 extern int sprintf_s(char * _restrict_ s, rsize_t n, const char * _restrict_ format, ...)
171 __attribute__ ((format (printf, 3, 4)));
172
183 extern int snprintf_s(char * _restrict_ s, rsize_t n, const char * _restrict_ format, ...)
184 __attribute__ ((format (printf, 3, 4)));
185
198 extern int sscanf_s(const char * _restrict_ s, const char * _restrict_ format, ...)
199 __attribute__ ((format (scanf, 2, 3)));
200
213 extern int vsscanf_s(const char * _restrict_ s, const char * _restrict_ format, va_list arg);
214
215 #endif /* __STDC_WANT_LIB_EXT1__ */
216
251 extern int snprintf(char *s, size_t count, const char *fmt, ...)
252 __attribute__ ((format (printf, 3, 4)));
253
294 extern int vsprintf(char *buffer, const char *format, va_list args);
339 extern int vsnprintf(char *buffer, size_t size, const char *format, va_list args);
340
362 extern int sscanf(const char *buf, const char *fmt, ...)
363 __attribute__ ((format (scanf, 2, 3)));
364
365
386 extern int asprintf(char **strp, const char *fmt, ...)
387 __attribute__ ((format (printf, 2, 3)));
388
395 extern int vasprintf(char **strp, const char *fmt, va_list args);
396
407 extern int vasprintf_s(char **strp, const char *fmt, va_list args);
408
416 extern int putchar(int ch);
417
424 extern int puts(const char *s);
425
438 int vsscanf(const char * buffer, const char * fmt, va_list args);
439
440 #ifdef __cplusplus
441 }
442 #endif
443
444 #endif /* __STDIO_H__ */
445
printf_s
int printf_s(const char *_restrict_ fmt,...)
format and print string.
stdout
FILE * stdout
Standard output stream.
fflush
int fflush(FILE *stream)
Flush a stream.
vsnprintf
int vsnprintf(char *buffer, size_t size, const char *format, va_list args)
Write formatted data from variable argument list to sized buffer.
vasprintf_s
int vasprintf_s(char **strp, const char *fmt, va_list args)
Print to allocated string in secure mode.
printf
int printf(const char *fmt,...)
Format and print string.
vasprintf
int vasprintf(char **strp, const char *fmt, va_list args)
print to allocated string.
vfprintf
int vfprintf(FILE *_restrict_ stream, const char *_restrict_ fmt, va_list ap)
The vfprintf() is equivalent to the fprintf(), but uses an argument list.
sprintf_s
int sprintf_s(char *_restrict_ s, rsize_t n, const char *_restrict_ format,...)
format string and save it to `s&#39;.
vsscanf_s
int vsscanf_s(const char *_restrict_ s, const char *_restrict_ format, va_list arg)
vsscanf unformat a buffer into a list of arguments.
putchar
int putchar(int ch)
writes a character to log.
stdin
FILE * stdin
Standard input stream (stub).
sscanf
int sscanf(const char *buf, const char *fmt,...)
Reads data from buf and stores them according to parameter fmt into the locations given by the additi...
sprintf
int sprintf(char *s, const char *fmt,...)
format and string and save it to `s&#39;.
vsprintf_s
int vsprintf_s(char *_restrict_ s, rsize_t n, const char *_restrict_ format, va_list arg)
Write formatted data from variable length argument list to string.
sscanf_s
int sscanf_s(const char *_restrict_ s, const char *_restrict_ format,...)
Reads data safely from buf and stores them according to parameter fmt into the locations given by the...
vsscanf
int vsscanf(const char *buffer, const char *fmt, va_list args)
vsscanf unformat a buffer into a list of arguments.
vsnprintf_s
int vsnprintf_s(char *_restrict_ s, rsize_t n, const char *_restrict_ format, va_list arg)
Write formatted data from variable argument list to sized buffer.
vsprintf
int vsprintf(char *buffer, const char *format, va_list args)
Write formatted data from variable argument list to string.
puts
int puts(const char *s)
writes the string s and a trailing newline to log(dmesg).
fprintf
int fprintf(FILE *_restrict_ stream, const char *_restrict_ fmt,...)
The fprintf() is equivalent to the printf(), but uses a custom file handle.
snprintf
int snprintf(char *s, size_t count, const char *fmt,...)
format and string and save it to `s&#39;.
stderr
FILE * stderr
Standard error stream.
asprintf
int asprintf(char **strp, const char *fmt,...)
print to allocated string.
snprintf_s
int snprintf_s(char *_restrict_ s, rsize_t n, const char *_restrict_ format,...)
Format string and save it to `s&#39;.