Samsung Internal API reference  2.0
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 
int printf_s(const char *_restrict_ fmt,...)
format and print string.
FILE * stdout
Standard output stream.
int fflush(FILE *stream)
Flush a stream.
int vsnprintf(char *buffer, size_t size, const char *format, va_list args)
Write formatted data from variable argument list to sized buffer.
int vasprintf_s(char **strp, const char *fmt, va_list args)
Print to allocated string in secure mode.
int printf(const char *fmt,...)
Format and print string.
int vasprintf(char **strp, const char *fmt, va_list args)
print to allocated string.
int vfprintf(FILE *_restrict_ stream, const char *_restrict_ fmt, va_list ap)
The vfprintf() is equivalent to the fprintf(), but uses an argument list.
int sprintf_s(char *_restrict_ s, rsize_t n, const char *_restrict_ format,...)
format string and save it to `s&#39;.
int vsscanf_s(const char *_restrict_ s, const char *_restrict_ format, va_list arg)
vsscanf unformat a buffer into a list of arguments.
int putchar(int ch)
writes a character to log.
FILE * stdin
Standard input stream (stub).
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...
int sprintf(char *s, const char *fmt,...)
format and string and save it to `s&#39;.
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.
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...
int vsscanf(const char *buffer, const char *fmt, va_list args)
vsscanf unformat a buffer into a list of arguments.
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.
int vsprintf(char *buffer, const char *format, va_list args)
Write formatted data from variable argument list to string.
int puts(const char *s)
writes the string s and a trailing newline to log(dmesg).
int fprintf(FILE *_restrict_ stream, const char *_restrict_ fmt,...)
The fprintf() is equivalent to the printf(), but uses a custom file handle.
int snprintf(char *s, size_t count, const char *fmt,...)
format and string and save it to `s&#39;.
FILE * stderr
Standard error stream.
int asprintf(char **strp, const char *fmt,...)
print to allocated string.
int snprintf_s(char *_restrict_ s, rsize_t n, const char *_restrict_ format,...)
Format string and save it to `s&#39;.