TizenRT Libs&Environment
v2.0 M2
|
Provides APIs for Standard Input/Output. More...
![]() |
Files | |
file | stdio.h |
Standard Input / Output APIs. | |
Macros | |
#define | FILENAME_MAX _POSIX_NAME_MAX |
#define | BUFSSIZ 64 |
#define | _IOFBF 0 /* Fully buffered */ |
#define | _IOLBF 1 /* Line buffered */ |
#define | _IONBF 2 /* Unbuffered */ |
#define | EOF (-1) |
#define | stdin (NULL) |
#define | stdout (NULL) |
#define | stderr (NULL) |
#define | putc(c, s) fputc((c), (s)) |
put a byte on a stream More... | |
#define | putchar(c) fputc(c, stdout) |
put a byte on a stdout stream More... | |
#define | getc(s) fgetc(s) |
get a byte from a stream More... | |
#define | getchar() fgetc(stdin) |
get a byte from a stdin stream More... | |
#define | CONFIG_LIBC_TMPDIR "/tmp" |
#define | P_tmpdir CONFIG_LIBC_TMPDIR |
#define | CONFIG_LIBC_MAX_TMPFILE 32 |
#define | L_tmpnam CONFIG_LIBC_MAX_TMPFILE |
#define | TMP_MAX 56800235584ull |
#define | EXTERN extern |
Typedefs | |
typedef struct file_struct | FILE |
Functions | |
int | fclose (FAR FILE *stream) |
close a stream More... | |
int | fflush (FAR FILE *stream) |
flush a stream More... | |
int | feof (FAR FILE *stream) |
test end-of-file indicator on a stream More... | |
int | ferror (FAR FILE *stream) |
test error indicator on a stream More... | |
int | fileno (FAR FILE *stream) |
map a stream pointer to a file descriptor More... | |
int | fgetc (FAR FILE *stream) |
get a byte from a stream More... | |
int | fgetpos (FAR FILE *stream, FAR fpos_t *pos) |
get current file position information More... | |
char * | fgets (FAR char *s, int n, FAR FILE *stream) |
get a string from a stream More... | |
FAR FILE * | fopen (FAR const char *path, FAR const char *type) |
open a stream More... | |
FAR FILE * | freopen (FAR const char *path, FAR const char *mode, FAR FILE *stream) |
open a stream More... | |
void | setbuf (FAR FILE *stream, FAR char *buf) |
assign buffering to a stream More... | |
int | setvbuf (FAR FILE *stream, FAR char *buffer, int mode, size_t size) |
assign buffering to a stream More... | |
int | fprintf (FAR FILE *stream, FAR const char *format,...) |
print formatted output More... | |
int | fputc (int c, FAR FILE *stream) |
put a byte on a stream More... | |
int | fputs (FAR const char *s, FAR FILE *stream) |
put a string on a stream More... | |
size_t | fread (FAR void *ptr, size_t size, size_t n_items, FAR FILE *stream) |
binary input More... | |
int | fseek (FAR FILE *stream, long int offset, int whence) |
reposition a file-position indicator in a stream More... | |
int | fsetpos (FAR FILE *stream, FAR fpos_t *pos) |
set current file position More... | |
long | ftell (FAR FILE *stream) |
return a file offset in a stream More... | |
size_t | fwrite (FAR const void *ptr, size_t size, size_t n_items, FAR FILE *stream) |
binary output More... | |
FAR char * | gets (FAR char *s) |
get a string from a stdin stream More... | |
FAR char * | gets_s (FAR char *s, rsize_t n) |
reads a line from stdin into the buffer More... | |
int | ungetc (int c, FAR FILE *stream) |
push byte back into input stream More... | |
int | printf (FAR const char *format,...) |
print formatted output More... | |
int | puts (FAR const char *s) |
put a string on standard output More... | |
int | sprintf (FAR char *buf, FAR const char *format,...) |
print formatted output More... | |
int | asprintf (FAR char **ptr, FAR const char *fmt,...) |
print formatted output More... | |
int | snprintf (FAR char *buf, size_t size, FAR const char *format,...) |
print formatted output More... | |
int | sscanf (FAR const char *buf, FAR const char *fmt,...) |
convert formatted input More... | |
void | perror (FAR const char *s) |
write error messages to standard error More... | |
int | vprintf (FAR const char *format, va_list ap) |
format output of a stdarg argument list More... | |
int | vfprintf (FAR FILE *stream, const char *format, va_list ap) |
format output of a stdarg argument list More... | |
int | vsprintf (FAR char *buf, const char *format, va_list ap) |
format output of a stdarg argument list More... | |
int | vsnprintf (FAR char *buf, size_t size, const char *format, va_list ap) |
format output of a stdarg argument list More... | |
int | vsscanf (FAR const char *buf, FAR const char *s, va_list ap) |
format input of a stdarg argument list More... | |
FAR FILE * | fdopen (int fd, FAR const char *type) |
associate a stream with a file descriptor More... | |
Provides APIs for Standard Input/Output.
#define getc | ( | s | ) | fgetc(s) |
get a byte from a stream
#include <stdio.h>
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
get a byte from a stdin stream
#include <stdio.h>
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
#define L_tmpnam CONFIG_LIBC_MAX_TMPFILE |
#define P_tmpdir CONFIG_LIBC_TMPDIR |
#define putc | ( | c, | |
s | |||
) | fputc((c), (s)) |
put a byte on a stream
#include <stdio.h>
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
put a byte on a stdout stream
#include <stdio.h>
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
int asprintf | ( | FAR char ** | ptr, |
FAR const char * | fmt, | ||
... | |||
) |
print formatted output
#include <stdio.h>
This function is similar to sprintf, except that it dynamically allocates a string (as with malloc) to hold the output, instead of putting the output in a buffer you allocate in advance. The ptr argument should be the address of a char * object, and a successful call to asprintf stores a pointer to the newly allocated string at that location.
int fclose | ( | FAR FILE * | stream | ) |
close a stream
#include <stdio.h>
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
FAR FILE* fdopen | ( | int | fd, |
FAR const char * | type | ||
) |
associate a stream with a file descriptor
#include <stdio.h>
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
int feof | ( | FAR FILE * | stream | ) |
test end-of-file indicator on a stream
#include <stdio.h>
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
int ferror | ( | FAR FILE * | stream | ) |
test error indicator on a stream
#include <stdio.h>
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
int fflush | ( | FAR FILE * | stream | ) |
flush a stream
#include <stdio.h>
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
int fgetc | ( | FAR FILE * | stream | ) |
get a byte from a stream
#include <stdio.h>
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
int fgetpos | ( | FAR FILE * | stream, |
FAR fpos_t * | pos | ||
) |
get current file position information
#include <stdio.h>
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
char* fgets | ( | FAR char * | s, |
int | n, | ||
FAR FILE * | stream | ||
) |
get a string from a stream
#include <stdio.h>
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
int fileno | ( | FAR FILE * | stream | ) |
map a stream pointer to a file descriptor
#include <stdio.h>
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
FAR FILE* fopen | ( | FAR const char * | path, |
FAR const char * | type | ||
) |
open a stream
#include <stdio.h>
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
int fprintf | ( | FAR FILE * | stream, |
FAR const char * | format, | ||
... | |||
) |
print formatted output
#include <stdio.h>
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
int fputc | ( | int | c, |
FAR FILE * | stream | ||
) |
put a byte on a stream
#include <stdio.h>
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
int fputs | ( | FAR const char * | s, |
FAR FILE * | stream | ||
) |
put a string on a stream
#include <stdio.h>
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
size_t fread | ( | FAR void * | ptr, |
size_t | size, | ||
size_t | n_items, | ||
FAR FILE * | stream | ||
) |
binary input
#include <stdio.h>
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
open a stream
#include <stdio.h>
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
int fseek | ( | FAR FILE * | stream, |
long int | offset, | ||
int | whence | ||
) |
reposition a file-position indicator in a stream
#include <stdio.h>
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
int fsetpos | ( | FAR FILE * | stream, |
FAR fpos_t * | pos | ||
) |
set current file position
#include <stdio.h>
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
long ftell | ( | FAR FILE * | stream | ) |
return a file offset in a stream
#include <stdio.h>
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
size_t fwrite | ( | FAR const void * | ptr, |
size_t | size, | ||
size_t | n_items, | ||
FAR FILE * | stream | ||
) |
binary output
#include <stdio.h>
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
FAR char* gets | ( | FAR char * | s | ) |
get a string from a stdin stream
#include <stdio.h>
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
FAR char* gets_s | ( | FAR char * | s, |
rsize_t | n | ||
) |
reads a line from stdin into the buffer
#include <stdio.h>
gets() reads a line from stdin into the buffer pointed to by s until either a terminating newline or EOF, which it replaces with '\0'. Reads at most n-1 characters from stdin into the array pointed to by str until new-line character, end-of-file condition, or read error. The newline character, if encountered, is not saved in the arraay. A NUL character is written immediately after the last character read into the array, or to str[0] if no characters were read.
If n is zero or is greater than RSIZE_MAX, a null character is written to str[0] but the function reads and discards characters from stdin until new-line character, end-of-file condition, or read error (not implemented).
If n-1 characters have been read, continues reading and discarding the characters from stdin until new-line character, end-of-file condition, or read error.
[out] | s | buffer to save string from stdin |
[in] | n | size of string to save |
void perror | ( | FAR const char * | s | ) |
write error messages to standard error
#include <stdio.h>
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
int printf | ( | FAR const char * | format, |
... | |||
) |
print formatted output
#include <stdio.h>
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
int puts | ( | FAR const char * | s | ) |
put a string on standard output
#include <stdio.h>
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
void setbuf | ( | FAR FILE * | stream, |
FAR char * | buf | ||
) |
assign buffering to a stream
#include <stdio.h>
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
int setvbuf | ( | FAR FILE * | stream, |
FAR char * | buffer, | ||
int | mode, | ||
size_t | size | ||
) |
assign buffering to a stream
#include <stdio.h>
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
int snprintf | ( | FAR char * | buf, |
size_t | size, | ||
FAR const char * | format, | ||
... | |||
) |
print formatted output
#include <stdio.h>
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
int sprintf | ( | FAR char * | buf, |
FAR const char * | format, | ||
... | |||
) |
print formatted output
#include <stdio.h>
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
int sscanf | ( | FAR const char * | buf, |
FAR const char * | fmt, | ||
... | |||
) |
convert formatted input
#include <stdio.h>
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
int ungetc | ( | int | c, |
FAR FILE * | stream | ||
) |
push byte back into input stream
#include <stdio.h>
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
int vfprintf | ( | FAR FILE * | stream, |
const char * | format, | ||
va_list | ap | ||
) |
format output of a stdarg argument list
#include <stdio.h>
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
int vprintf | ( | FAR const char * | format, |
va_list | ap | ||
) |
format output of a stdarg argument list
#include <stdio.h>
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
int vsnprintf | ( | FAR char * | buf, |
size_t | size, | ||
const char * | format, | ||
va_list | ap | ||
) |
format output of a stdarg argument list
#include <stdio.h>
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
int vsprintf | ( | FAR char * | buf, |
const char * | format, | ||
va_list | ap | ||
) |
format output of a stdarg argument list
#include <stdio.h>
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
int vsscanf | ( | FAR const char * | buf, |
FAR const char * | s, | ||
va_list | ap | ||
) |
format input of a stdarg argument list
#include <stdio.h>
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)