stdio.h header reference
[C library module]

The source code of this header can be browsed online.

Members [link] 

Types [link] 

Functions [link] 

  • void clearerr(FILE *stream)
  • error_t fclose(FILE *file)
  • bool_t feof(FILE *stream)
  • bool_t ferror(FILE *stream)
  • error_t fflush(FILE *file)
  • int_fast16_t fgetc(FILE *file)
  • error_t fgetpos(FILE *file, fpos_t *pos)
  • char * fgets(char *str, size_t size, FILE *file)
  • FILE * fopen(const char *path, const char *mode)
  • ssize_t fprintf(FILE *file, const char *format, ...)
  • error_t fpurge(FILE *file)
  • int_fast16_t fputc(unsigned char c, FILE *file)
  • error_t fputs(const char *str, FILE *file)
  • size_t fread(void *ptr, size_t size, size_t nmemb, FILE *file)
  • ssize_t fscanf(FILE *file, const char *format, ...)
  • error_t fseek(FILE *file, fpos_t offset, int_fast8_t whence)
  • error_t fsetpos(FILE *file, const fpos_t *pos)
  • fpos_t ftell(FILE *file)
  • size_t fwrite(const void *ptr, size_t size, size_t nmemb, FILE *file)
  • int_fast16_t getc(FILE *file)
  • int_fast16_t getchar(void )
  • char * gets(char *s)
  • void perror(const char *reason)
  • ssize_t printf(const char *format, ...)
  • int_fast16_t putc(int_fast16_t c, FILE *file)
  • int_fast16_t putchar(int_fast16_t c)
  • error_t puts(const char *str)
  • void rewind(FILE *file)
  • ssize_t scanf(const char *format, ...)
  • error_t setvbuf(FILE *file, char *buf, enum stdio_buf_mode_e mode, size_t size)
  • ssize_t snprintf(char *str, size_t size, const char *format, ...)
  • ssize_t sprintf(char *str, const char *format, ...)
  • ssize_t sscanf(const char *str, const char *format, ...)
  • int_fast16_t ungetc(int_fast16_t c, FILE *file)
  • ssize_t vfprintf(FILE *file, const char *format, va_list ap)
  • ssize_t vfscanf(FILE *file, const char *fmt, va_list ap)
  • ssize_t vprintf(const char *format, va_list ap)
  • ssize_t vscanf(const char *format, va_list ap)
  • ssize_t vsnprintf(char *str, size_t size, const char *format, va_list ap)
  • ssize_t vsprintf(char *str, const char *format, va_list ap)
  • ssize_t vsscanf(const char *str, const char *format, va_list ap)
  • error_t __stdio_read(size_t size_, FILE *file, uint8_t *ptr)
  • void __stdio_stream_init(FILE *stream)
  • error_t __stdio_write(size_t size_, FILE *file, const uint8_t *ptr)

Variables [link] 

Macros [link] 

Members detail [link] 

#define BUFSIZ [link] 

This macro is declared in stdio.h source file, line 76.

standard BUFSIZ macro

#define EOF [link] 

This macro is declared in stdio.h source file, line 79.

standard EOF macro

typedef struct file_s FILE [link] 

This typedef is declared in stdio.h source file, line 107.

Alternate declarations with same identifier: [1], [2].

Preprocessor condition: defined( CONFIG_LIBC_STREAM )

typedef struct file_s FILE [link] 

This typedef is declared in stdio.h source file, line 123.

Alternate declarations with same identifier: [1], [2].

Preprocessor condition: not defined( CONFIG_LIBC_STREAM )

#define GCT_CONTAINER_ALGO_stream_fifo [link] 

This macro is declared in stdio.h source file, line 90.

Preprocessor condition: defined( CONFIG_LIBC_STREAM )

#define STDIO_H_ [link] 

This macro is declared in stdio.h source file, line 23.

void clearerr(FILE *stream) [link] 

This function is declared in stdio.h source file, line 288.

This is available when CONFIG_LIBC_STREAM is defined.

error_t fclose(FILE *file) [link] 

This function is declared in stdio.h source file, line 132.

This is available when CONFIG_LIBC_STREAM is defined.

bool_t feof(FILE *stream) [link] 

This function is declared in stdio.h source file, line 315.

This is available when CONFIG_LIBC_STREAM is defined.

bool_t ferror(FILE *stream) [link] 

This function is declared in stdio.h source file, line 302.

This is available when CONFIG_LIBC_STREAM is defined.

error_t fflush(FILE *file) [link] 

This function is declared in stdio.h source file, line 168.

This is available when CONFIG_LIBC_STREAM is defined.

int_fast16_t fgetc(FILE *file) [link] 

This function is declared in stdio.h source file, line 140.

This is available when CONFIG_LIBC_STREAM is defined.

error_t fgetpos(FILE *file, fpos_t *pos) [link] 

This function is declared in stdio.h source file, line 234.

This is available when CONFIG_LIBC_STREAM is defined.

char * fgets(char *str, size_t size, FILE *file) [link] 

This function is declared in stdio.h source file, line 152.

This is available when CONFIG_LIBC_STREAM is defined.

struct file_s [link] 

This struct is declared in stdio.h source file, line 96.

Alternate declarations with same identifier: [1], [2].

Preprocessor condition: defined( CONFIG_LIBC_STREAM )

FieldDescription
const struct fileops_s * ops;
void * hndl;
error_t (*rwflush)(struct file_s *file) ;
stream_fifo_root_t fifo_read;
stream_fifo_root_t fifo_write;
fpos_t pos;
enum stdio_buf_mode_e buf_mode;
bool_t eof;
bool_t error;

See also FILE.

struct file_s [link] 

This struct is declared in stdio.h source file, line 123.

Alternate declarations with same identifier: [1], [2].

Preprocessor condition: not defined( CONFIG_LIBC_STREAM )

This struct is empty.

See also FILE.

FILE * fopen(const char *path, const char *mode) [link] 

This function is declared in stdio.h source file, line 128.

This is available when CONFIG_LIBC_STREAM and CONFIG_LIBC_VFS are both defined.

typedef int32_t fpos_t [link] 

This typedef is declared in stdio.h source file, line 82.

ssize_t fprintf(FILE *file, const char *format, ...) [link] 

This function is declared in stdio.h source file, line 180.

This is available when CONFIG_LIBC_STREAM and CONFIG_LIBC_PRINTF are both defined.

error_t fpurge(FILE *file) [link] 

This function is declared in stdio.h source file, line 172.

This is available when CONFIG_LIBC_STREAM is defined.

int_fast16_t fputc(unsigned char c, FILE *file) [link] 

This function is declared in stdio.h source file, line 136.

This is available when CONFIG_LIBC_STREAM is defined.

error_t fputs(const char *str, FILE *file) [link] 

This function is declared in stdio.h source file, line 156.

This is available when CONFIG_LIBC_STREAM is defined.

size_t fread(void *ptr, size_t size, size_t nmemb, FILE *file) [link] 

This function is declared in stdio.h source file, line 144.

This is available when CONFIG_LIBC_STREAM is defined.

ssize_t fscanf(FILE *file, const char *format, ...) [link] 

This function is declared in stdio.h source file, line 184.

This is available when CONFIG_LIBC_STREAM and CONFIG_LIBC_SCANF are both defined.

error_t fseek(FILE *file, fpos_t offset, int_fast8_t whence) [link] 

This function is declared in stdio.h source file, line 164.

This is available when CONFIG_LIBC_STREAM is defined.

error_t fsetpos(FILE *file, const fpos_t *pos) [link] 

This function is declared in stdio.h source file, line 248.

This is available when CONFIG_LIBC_STREAM is defined.

fpos_t ftell(FILE *file) [link] 

This function is declared in stdio.h source file, line 207.

This is available when CONFIG_LIBC_STREAM is defined.

size_t fwrite(const void *ptr, size_t size, size_t nmemb, FILE *file) [link] 

This function is declared in stdio.h source file, line 148.

This is available when CONFIG_LIBC_STREAM is defined.

int_fast16_t getc(FILE *file) [link] 

This function is declared in stdio.h source file, line 261.

This is available when CONFIG_LIBC_STREAM is defined.

int_fast16_t getchar(void ) [link] 

This function is declared in stdio.h source file, line 340.

This is available when CONFIG_LIBC_STREAM_STD is defined.

char * gets(char *s) [link] 

This function is declared in stdio.h source file, line 387.

This is available when CONFIG_LIBC_STREAM_STD is defined.

void perror(const char *reason) [link] 

This function is declared in stdio.h source file, line 393.

This is available when CONFIG_LIBC_STREAM_STD is defined.

ssize_t printf(const char *format, ...) [link] 

This function is declared in stdio.h source file, line 376.

This function use libc buffered streams and thus require CONFIG_LIBC_STREAM_STD to be enabled. Consider using printk instead for direct output.

This is available when CONFIG_LIBC_STREAM_STD and CONFIG_LIBC_PRINTF are both defined.

See also formatter_printf.

int_fast16_t putc(int_fast16_t c, FILE *file) [link] 

This function is declared in stdio.h source file, line 274.

This is available when CONFIG_LIBC_STREAM is defined.

int_fast16_t putchar(int_fast16_t c) [link] 

This function is declared in stdio.h source file, line 353.

This is available when CONFIG_LIBC_STREAM_STD is defined.

error_t puts(const char *str) [link] 

This function is declared in stdio.h source file, line 160.

This is available when CONFIG_LIBC_STREAM_STD is defined.

void rewind(FILE *file) [link] 

This function is declared in stdio.h source file, line 220.

This is available when CONFIG_LIBC_STREAM is defined.

ssize_t scanf(const char *format, ...) [link] 

This function is declared in stdio.h source file, line 62.

This is available when CONFIG_LIBC_SCANF and CONFIG_LIBC_STREAM_STD are both defined.

error_t setvbuf(FILE *file, char *buf, enum stdio_buf_mode_e mode, size_t size) [link] 

This function is declared in stdio.h source file, line 196.

This is available when CONFIG_LIBC_STREAM is defined.

ssize_t snprintf(char *str, size_t size, const char *format, ...) [link] 

This function is declared in stdio.h source file, line 50.

This is available when CONFIG_LIBC_PRINTF is defined.

ssize_t sprintf(char *str, const char *format, ...) [link] 

This function is declared in stdio.h source file, line 46.

This is available when CONFIG_LIBC_PRINTF is defined.

ssize_t sscanf(const char *str, const char *format, ...) [link] 

This function is declared in stdio.h source file, line 70.

This is available when CONFIG_LIBC_SCANF is defined.

FILE *const stderr [link] 

This variable is declared in stdio.h source file, line 329.

This is available when CONFIG_LIBC_STREAM_STD is defined.

FILE *const stdin [link] 

This variable is declared in stdio.h source file, line 321.

This is available when CONFIG_LIBC_STREAM_STD is defined.

enum stdio_buf_mode_e [link] 

This enum is declared in stdio.h source file, line 85.

IdentifierDescription
_IONBF
_IOLBF
_IOFBF

FILE *const stdout [link] 

This variable is declared in stdio.h source file, line 325.

This is available when CONFIG_LIBC_STREAM_STD is defined.

typedef void * stream_fifo_entry_t [link] 

This typedef is declared in stdio.h source file, line 93.

Preprocessor condition: defined( CONFIG_LIBC_STREAM )

typedef uint8_t stream_fifo_item_t [link] 

This typedef is declared in stdio.h source file, line 93.

Preprocessor condition: defined( CONFIG_LIBC_STREAM )

typedef void * stream_fifo_root_t [link] 

This typedef is declared in stdio.h source file, line 93.

Preprocessor condition: defined( CONFIG_LIBC_STREAM )

int_fast16_t ungetc(int_fast16_t c, FILE *file) [link] 

This function is declared in stdio.h source file, line 192.

This is available when CONFIG_LIBC_STREAM is defined.

ssize_t vfprintf(FILE *file, const char *format, va_list ap) [link] 

This function is declared in stdio.h source file, line 176.

This is available when CONFIG_LIBC_STREAM and CONFIG_LIBC_PRINTF are both defined.

ssize_t vfscanf(FILE *file, const char *fmt, va_list ap) [link] 

This function is declared in stdio.h source file, line 188.

This is available when CONFIG_LIBC_STREAM and CONFIG_LIBC_SCANF are both defined.

ssize_t vprintf(const char *format, va_list ap) [link] 

This function is declared in stdio.h source file, line 367.

This is available when CONFIG_LIBC_STREAM_STD and CONFIG_LIBC_PRINTF are both defined.

See also printf.

ssize_t vscanf(const char *format, va_list ap) [link] 

This function is declared in stdio.h source file, line 66.

This is available when CONFIG_LIBC_SCANF and CONFIG_LIBC_STREAM_STD are both defined.

ssize_t vsnprintf(char *str, size_t size, const char *format, va_list ap) [link] 

This function is declared in stdio.h source file, line 58.

This is available when CONFIG_LIBC_PRINTF is defined.

ssize_t vsprintf(char *str, const char *format, va_list ap) [link] 

This function is declared in stdio.h source file, line 54.

This is available when CONFIG_LIBC_PRINTF is defined.

ssize_t vsscanf(const char *str, const char *format, va_list ap) [link] 

This function is declared in stdio.h source file, line 74.

This is available when CONFIG_LIBC_SCANF is defined.

error_t __stdio_read(size_t size_, FILE *file, uint8_t *ptr) [link] 

This function is declared in stdio.h source file, line 112.

stream buffered read function.

The return value is 1 on success, 0 on end of stream and < 0 on error.

This function is for internal use only.

Preprocessor condition: defined( CONFIG_LIBC_STREAM )

void __stdio_stream_init(FILE *stream) [link] 

This function is declared in stdio.h source file, line 120.

perform stream object initialization

This function is for internal use only.

Preprocessor condition: defined( CONFIG_LIBC_STREAM )

error_t __stdio_write(size_t size_, FILE *file, const uint8_t *ptr) [link] 

This function is declared in stdio.h source file, line 117.

stream buffered write function.

The return value is 0 on success, < 0 on error.

This function is for internal use only.

Preprocessor condition: defined( CONFIG_LIBC_STREAM )

Valid XHTML 1.0 StrictGenerated by diaxen on Thu Aug 4 15:44:06 2022 using MkDoc