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
 

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.hpp.

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

◆ stdout

#define stdout   stdout

Definition at line 31 of file mos_stdio.hpp.

Referenced by generate_message(), main(), main(), main(), main(), test_TestMessage(), and uart_tx_hook().

◆ stderr

Typedef Documentation

◆ FILE

typedef struct _FILE FILE

Definition at line 24 of file mos_stdio.hpp.

Function Documentation

◆ int() [1/3]

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

Referenced by main().

◆ int() [2/3]

MOSAPI const char *__restrict MOSAPI int ( 3 ,
4  )
+ Here is the call graph for this function:

◆ 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.cpp.

Referenced by int(), and 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 )

Referenced by do_syslog(), lvprintk(), mos_kwarn(), snprintf(), sysfs_printf(), test_engine_warning_handler(), vsnprintf(), and vsprintf().

+ Here is the call graph for this function:

◆ 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 )

Referenced by vprintf().

+ Here is the call graph for this function:

◆ vfprintf()

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

Referenced by avr_logger(), and vfprintf().

+ Here is the call graph for this function:

◆ vdprintf()

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

Referenced by vdprintf().

+ Here is the call graph for this function:

◆ getchar()

MOSAPI int getchar ( void )

Referenced by getchar().

+ Here is the call graph for this function:

◆ putchar()

MOSAPI int putchar ( int c)

Referenced by putchar().

+ Here is the call graph for this function:

◆ puts()

MOSAPI int puts ( const char * s)

Referenced by puts().

+ Here is the call graph for this function:

◆ fputs()

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

Referenced by fputs().

+ Here is the call graph for this function:

◆ fputc()

MOSAPI int fputc ( int c,
FILE * file )

Referenced by fputc(), and uart_tx_hook().

+ Here is the call graph for this function:

◆ fgetc()

MOSAPI int fgetc ( FILE * file)

Referenced by fgetc(), and uart_xon_hook().

+ Here is the call graph for this function:

◆ fread()

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

Referenced by callback(), fread(), main(), main(), main(), and stream_callback().

+ Here is the call graph for this function:

◆ fwrite()

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

Referenced by fwrite(), generate_message(), main(), main(), main(), streamcallback(), and test_TestMessage().

+ Here is the call graph for this function:

◆ fseek()

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

Referenced by fseek().

+ Here is the call graph for this function:

◆ ftell()

off_t ftell ( FILE * stream)

Referenced by ftell().

+ Here is the call graph for this function:

◆ fopen()

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

Referenced by fopen().

+ Here is the call graph for this function:

◆ fclose()

int fclose ( FILE * stream)

Referenced by fclose().

+ Here is the call graph for this function:

Variable Documentation

◆ format

◆ size

MOSAPI const char *__restrict MOSAPI size_t size

Definition at line 18 of file mos_stdio.hpp.

◆ stdin

MOSAPI FILE* stdin

Definition at line 25 of file mos_stdio.hpp.

◆ stdout

MOSAPI FILE* stdout

Definition at line 26 of file mos_stdio.hpp.

◆ stderr

MOSAPI FILE* stderr

Definition at line 27 of file mos_stdio.hpp.