Standard I/O

Description

Standard I/O allows to get and put characters on stdio stream that is the default in I/O Streams.

Functions

sl_status_t sl_putchar (char c)
Put a character on the default stream.
sl_status_t sl_getchar (char *c)
Get a character on the default stream.

Macros

#define putchar sl_putchar_std_wrapper
Put a character on the default stream (match standard API).
#define getchar sl_getchar_std_wrapper
Get a character on the default stream.

Function Documentation

sl_putchar()

sl_status_t sl_putchar ( char c )

Put a character on the default stream.

Parameters
[in] c Character to print
Returns
Status result

sl_getchar()

sl_status_t sl_getchar ( char * c )

Get a character on the default stream.

Parameters
[out] c Pointer to variable that will receive the character.
Returns
Status result

Macro Definition Documentation

putchar

#define putchar   sl_putchar_std_wrapper

Put a character on the default stream (match standard API).

Parameters
[in] c Integer character to print
Returns
On success, the character written is returned. If a writing error occurs, -1 is returned (EOF).

getchar

#define getchar   sl_getchar_std_wrapper

Get a character on the default stream.

Returns
On success, the character read is returned If a reading error occurs, -1 is returned (EOF).