MOS Source Code
Loading...
Searching...
No Matches
libs.Stdio

Standard input/output functions. More...

+ Collaboration diagram for libs.Stdio:

Macros

#define stdin   stdin
 
#define stdout   stdout
 
#define stderr   stderr
 
#define STDIN_FILENO   0
 
#define STDOUT_FILENO   1
 
#define STDERR_FILENO   2
 

Typedefs

typedef struct _FILE FILE
 

Functions

MOSAPI int (2, 3) sprintf(char *__restrict str
 
MOSAPI const char *__restrict MOSAPI int (3, 4) snprintf(char *__restrict str
 
MOSAPI const char *__restrict MOSAPI size_t const char *__restrict MOSAPI int vsprintf (char *__restrict str, const char *__restrict format, va_list ap)
 
MOSAPI int vsnprintf (char *__restrict buf, size_t size, const char *__restrict format, va_list args)
 
MOSAPI int (1, 2) printf(const char *__restrict format
 
MOSAPI MOSAPI const char *__restrict MOSAPI const char *__restrict MOSAPI int vprintf (const char *__restrict format, va_list ap)
 
MOSAPI int vfprintf (FILE *__restrict file, const char *__restrict format, va_list ap)
 
MOSAPI int vdprintf (int fd, const char *__restrict format, va_list ap)
 
MOSAPI int getchar (void)
 
MOSAPI int putchar (int c)
 
MOSAPI int puts (const char *s)
 
MOSAPI int fputs (const char *__restrict s, FILE *__restrict file)
 
MOSAPI int fputc (int c, FILE *file)
 
MOSAPI int fgetc (FILE *file)
 
size_t fread (void *__restrict ptr, size_t size, size_t nmemb, FILE *__restrict stream)
 
size_t fwrite (const void *__restrict ptr, size_t size, size_t nmemb, FILE *__restrict stream)
 
int fseek (FILE *stream, long offset, io_seek_whence_t whence)
 
off_t ftell (FILE *stream)
 
FILEfopen (const char *path, const char *mode)
 
int fclose (FILE *stream)
 

Variables

MOSAPI const char *__restrict format
 
MOSAPI const char *__restrict MOSAPI size_t size
 
MOSAPI FILEstdin
 
MOSAPI FILEstdout
 
MOSAPI FILEstderr
 

Detailed Description

Standard input/output functions.

Macro Definition Documentation

◆ stdin

#define stdin   stdin

Definition at line 30 of file mos_stdio.h.

Referenced by main(), main(), main(), and uart_xon_hook().

◆ stdout

#define stdout   stdout

◆ stderr

◆ STDIN_FILENO

#define STDIN_FILENO   0

Definition at line 34 of file mos_stdio.h.

Referenced by stdin_can_read().

◆ STDOUT_FILENO

#define STDOUT_FILENO   1

Definition at line 35 of file mos_stdio.h.

◆ STDERR_FILENO

#define STDERR_FILENO   2

Definition at line 36 of file mos_stdio.h.

Typedef Documentation

◆ FILE

typedef struct _FILE FILE

Definition at line 24 of file mos_stdio.h.

Function Documentation

◆ int() [1/3]

MOSAPI MOSAPI const char *__restrict MOSAPI int ( 2 ,
3  )

Referenced by dispatch_syscall().

◆ int() [2/3]

MOSAPI const char *__restrict MOSAPI int ( 3 ,
4  )

◆ vsprintf()

MOSAPI const char *__restrict MOSAPI size_t const char *__restrict MOSAPI int vsprintf ( char *__restrict str,
const char *__restrict format,
va_list ap )

Definition at line 25 of file mos_stdio.c.

Referenced by sprintf().

+ Here is the call graph for this function:

◆ vsnprintf()

MOSAPI int vsnprintf ( char *__restrict buf,
size_t size,
const char *__restrict format,
va_list args )

◆ int() [3/3]

MOSAPI int ( 1 ,
2  ) const

◆ vprintf()

MOSAPI MOSAPI const char *__restrict MOSAPI const char *__restrict MOSAPI int vprintf ( const char *__restrict format,
va_list ap )

◆ vfprintf()

MOSAPI int vfprintf ( FILE *__restrict file,
const char *__restrict format,
va_list ap )

Referenced by avr_logger().

◆ vdprintf()

MOSAPI int vdprintf ( int fd,
const char *__restrict format,
va_list ap )

◆ getchar()

MOSAPI int getchar ( void )

◆ putchar()

MOSAPI int putchar ( int c)

◆ puts()

MOSAPI int puts ( const char * s)

◆ fputs()

MOSAPI int fputs ( const char *__restrict s,
FILE *__restrict file )

◆ fputc()

MOSAPI int fputc ( int c,
FILE * file )

Referenced by uart_tx_hook().

◆ fgetc()

MOSAPI int fgetc ( FILE * file)

Referenced by uart_xon_hook().

◆ fread()

size_t fread ( void *__restrict ptr,
size_t size,
size_t nmemb,
FILE *__restrict stream )

◆ fwrite()

size_t fwrite ( const void *__restrict ptr,
size_t size,
size_t nmemb,
FILE *__restrict stream )

◆ fseek()

int fseek ( FILE * stream,
long offset,
io_seek_whence_t whence )

◆ ftell()

off_t ftell ( FILE * stream)

◆ fopen()

FILE * fopen ( const char * path,
const char * mode )

◆ fclose()

int fclose ( FILE * stream)

Variable Documentation

◆ format

MOSAPI MOSAPI const char *__restrict MOSAPI const char *__restrict format

◆ size

MOSAPI const char *__restrict MOSAPI size_t size

Definition at line 18 of file mos_stdio.h.

◆ stdin

MOSAPI FILE* stdin

Definition at line 25 of file mos_stdio.h.

◆ stdout

MOSAPI FILE* stdout

Definition at line 26 of file mos_stdio.h.

◆ stderr

MOSAPI FILE* stderr

Definition at line 27 of file mos_stdio.h.