Functions
Attempts to flush stdout.
Returns: int errc - Nonzero on error.
Attempts to flush stderr.
Returns: int errc - Nonzero on error.
Frees memory allocated by nstd_io_read and nstd_io_readline.
Parameters:
const char **str - Pointer to the string returned from the read functions.
Reads from stdin and returns the read string.
Parameters:
int *errc - Error code, returns as nonzero on error.
Returns: char *in - String read from stdin.
Reads a single character from stdin.
Parameters:
int *errc - Error code, returns as nonzero on error.
Returns: char ch - Character read from stdin.
Reads from stdin and returns the read string appending a newline to the end.
Parameters:
int *errc - Error code, returns as nonzero on error.
Returns: char *in - String read from stdin.
Writes str to stdout.
Parameters:
const char *const str - String to write to stdout.
Returns: int errc - Nonzero on error.
Writes a single character to stdout.
Parameters:
const char ch - Character to write.
Returns: int errc - Nonzero on error.
Writes a single character to stderr.
Parameters:
const char ch - Character to write.
Returns: int errc - Nonzero on error.
Writes str to stderr.
Parameters:
const char *const str - String to write to stderr.
Returns: int errc - Nonzero on error.
Writes str to stdout with an additional newline.
Parameters:
const char *const str - String to write to stdout.
Returns: int errc - Nonzero on error.
Writes str to stderr with an additional newline.
Parameters:
const char *const str - String to write to stderr.
Returns: int errc - Nonzero on error.
Writes a raw byte slice to stdout.
Parameters:
const NSTDSlice *const bytes - The byte slice to write to stdout.
Returns: int errc - Nonzero on error.
Writes a raw byte slice to stderr.
Parameters:
const NSTDSlice *const bytes - The byte slice to write to stderr.
Returns: int errc - Nonzero on error.