Tizen RT Libs&Environment  v1.0 D5

Provides APIs for Standard Input/Output. More...

Collaboration diagram for STDIO:

Files

file  stdio.h
 Standard Input / Output APIs.
 

Macros

#define FILENAME_MAX   _POSIX_NAME_MAX
 
#define EOF   (-1)
 
#define stdin   (&sched_getstreams()->sl_streams[0])
 
#define stdout   (&sched_getstreams()->sl_streams[1])
 
#define stderr   (&sched_getstreams()->sl_streams[2])
 
#define putc(c, s)   fputc((c), (s))
 POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/) More...
 
#define putchar(c)   fputc(c, stdout)
 POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/) More...
 
#define getc(s)   fgetc(s)
 POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/) More...
 
#define getchar()   fgetc(stdin)
 POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/) 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)
 POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/) More...
 
int fflush (FAR FILE *stream)
 POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/) More...
 
int feof (FAR FILE *stream)
 POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/) More...
 
int ferror (FAR FILE *stream)
 POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/) More...
 
int fileno (FAR FILE *stream)
 POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/) More...
 
int fgetc (FAR FILE *stream)
 POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/) More...
 
int fgetpos (FAR FILE *stream, FAR fpos_t *pos)
 POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/) More...
 
char * fgets (FAR char *s, int n, FAR FILE *stream)
 POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/) More...
 
FAR FILEfopen (FAR const char *path, FAR const char *type)
 POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/) More...
 
int fprintf (FAR FILE *stream, FAR const char *format,...)
 POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/) More...
 
int fputc (int c, FAR FILE *stream)
 POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/) More...
 
int fputs (FAR const char *s, FAR FILE *stream)
 POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/) More...
 
size_t fread (FAR void *ptr, size_t size, size_t n_items, FAR FILE *stream)
 POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/) More...
 
int fseek (FAR FILE *stream, long int offset, int whence)
 POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/) More...
 
int fsetpos (FAR FILE *stream, FAR fpos_t *pos)
 POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/) More...
 
long ftell (FAR FILE *stream)
 POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/) More...
 
size_t fwrite (FAR const void *ptr, size_t size, size_t n_items, FAR FILE *stream)
 POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/) More...
 
FAR char * gets (FAR char *s)
 POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/) 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)
 POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/) More...
 
int printf (FAR const char *format,...)
 POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/) More...
 
int puts (FAR const char *s)
 POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/) More...
 
int sprintf (FAR char *buf, FAR const char *format,...)
 POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/) More...
 
int asprintf (FAR char **ptr, FAR const char *fmt,...)
 POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/) More...
 
int snprintf (FAR char *buf, size_t size, FAR const char *format,...)
 POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/) More...
 
int sscanf (FAR const char *buf, FAR const char *fmt,...)
 POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/) More...
 
void perror (FAR const char *s)
 POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/) More...
 
int vprintf (FAR const char *format, va_list ap)
 POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/) More...
 
int vfprintf (FAR FILE *stream, const char *format, va_list ap)
 POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/) More...
 
int vsprintf (FAR char *buf, const char *format, va_list ap)
 POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/) More...
 
int vsnprintf (FAR char *buf, size_t size, const char *format, va_list ap)
 POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/) More...
 
int vsscanf (FAR const char *buf, FAR const char *s, va_list ap)
 POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/) More...
 
FAR FILEfdopen (int fd, FAR const char *type)
 POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/) More...
 

Detailed Description

Provides APIs for Standard Input/Output.

Macro Definition Documentation

#define CONFIG_LIBC_MAX_TMPFILE   32

Definition at line 146 of file stdio.h.

#define CONFIG_LIBC_TMPDIR   "/tmp"

Definition at line 138 of file stdio.h.

#define EOF   (-1)

Definition at line 94 of file stdio.h.

#define EXTERN   extern

Definition at line 172 of file stdio.h.

#define FILENAME_MAX   _POSIX_NAME_MAX

Definition at line 90 of file stdio.h.

#define getc (   s)    fgetc(s)

POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

Since
Tizen RT v1.0

Definition at line 120 of file stdio.h.

#define getchar ( )    fgetc(stdin)

POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

Since
Tizen RT v1.0

Definition at line 125 of file stdio.h.

#define L_tmpnam   CONFIG_LIBC_MAX_TMPFILE

Definition at line 149 of file stdio.h.

#define P_tmpdir   CONFIG_LIBC_TMPDIR

Definition at line 141 of file stdio.h.

#define putc (   c,
 
)    fputc((c), (s))

POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

Since
Tizen RT v1.0

Definition at line 110 of file stdio.h.

#define putchar (   c)    fputc(c, stdout)

POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

Since
Tizen RT v1.0

Definition at line 115 of file stdio.h.

#define stderr   (&sched_getstreams()->sl_streams[2])

Definition at line 100 of file stdio.h.

#define stdin   (&sched_getstreams()->sl_streams[0])

Definition at line 98 of file stdio.h.

#define stdout   (&sched_getstreams()->sl_streams[1])

Definition at line 99 of file stdio.h.

#define TMP_MAX   56800235584ull

Definition at line 153 of file stdio.h.

Typedef Documentation

typedef struct file_struct FILE

Definition at line 161 of file stdio.h.

Function Documentation

int asprintf ( FAR char **  ptr,
FAR const char *  fmt,
  ... 
)

POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

Since
Tizen RT v1.0
int fclose ( FAR FILE stream)

POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

Since
Tizen RT v1.0
FAR FILE* fdopen ( int  fd,
FAR const char *  type 
)

POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

Since
Tizen RT v1.0
int feof ( FAR FILE stream)

POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

Since
Tizen RT v1.0
int ferror ( FAR FILE stream)

POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

Since
Tizen RT v1.0
int fflush ( FAR FILE stream)

POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

Since
Tizen RT v1.0
int fgetc ( FAR FILE stream)

POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

Since
Tizen RT v1.0
int fgetpos ( FAR FILE stream,
FAR fpos_t *  pos 
)

POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

Since
Tizen RT v1.0
char* fgets ( FAR char *  s,
int  n,
FAR FILE stream 
)

POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

Since
Tizen RT v1.0
int fileno ( FAR FILE stream)

POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

Since
Tizen RT v1.0
FAR FILE* fopen ( FAR const char *  path,
FAR const char *  type 
)

POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

Since
Tizen RT v1.0
int fprintf ( FAR FILE stream,
FAR const char *  format,
  ... 
)

POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

Since
Tizen RT v1.0
int fputc ( int  c,
FAR FILE stream 
)

POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

Since
Tizen RT v1.0
int fputs ( FAR const char *  s,
FAR FILE stream 
)

POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

Since
Tizen RT v1.0
size_t fread ( FAR void *  ptr,
size_t  size,
size_t  n_items,
FAR FILE stream 
)

POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

Since
Tizen RT v1.0
int fseek ( FAR FILE stream,
long int  offset,
int  whence 
)

POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

Since
Tizen RT v1.0
int fsetpos ( FAR FILE stream,
FAR fpos_t *  pos 
)

POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

Since
Tizen RT v1.0
long ftell ( FAR FILE stream)

POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

Since
Tizen RT v1.0
size_t fwrite ( FAR const void *  ptr,
size_t  size,
size_t  n_items,
FAR FILE stream 
)

POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

Since
Tizen RT v1.0
FAR char* gets ( FAR char *  s)

POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

Since
Tizen RT v1.0
FAR char* gets_s ( FAR char *  s,
rsize_t  n 
)

reads a line from stdin into the buffer

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.

Parameters
[out]sbuffer to save string from stdin
[in]nsize of string to save
Returns
On success, a pointer of buffer is returned. On failure, NULL is returned.
Since
Tizen RT v1.0
void perror ( FAR const char *  s)

POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

Since
Tizen RT v1.0
int printf ( FAR const char *  format,
  ... 
)

POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

Since
Tizen RT v1.0
int puts ( FAR const char *  s)

POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

Since
Tizen RT v1.0
int snprintf ( FAR char *  buf,
size_t  size,
FAR const char *  format,
  ... 
)

POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

Since
Tizen RT v1.0
int sprintf ( FAR char *  buf,
FAR const char *  format,
  ... 
)

POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

Since
Tizen RT v1.0
int sscanf ( FAR const char *  buf,
FAR const char *  fmt,
  ... 
)

POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

Since
Tizen RT v1.0
int ungetc ( int  c,
FAR FILE stream 
)

POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

Since
Tizen RT v1.0
int vfprintf ( FAR FILE stream,
const char *  format,
va_list  ap 
)

POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

Since
Tizen RT v1.0
int vprintf ( FAR const char *  format,
va_list  ap 
)

POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

Since
Tizen RT v1.0
int vsnprintf ( FAR char *  buf,
size_t  size,
const char *  format,
va_list  ap 
)

POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

Since
Tizen RT v1.0
int vsprintf ( FAR char *  buf,
const char *  format,
va_list  ap 
)

POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

Since
Tizen RT v1.0
int vsscanf ( FAR const char *  buf,
FAR const char *  s,
va_list  ap 
)

POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

Since
Tizen RT v1.0