Module io
I/O declarations (C11/C17/C23 stdio coverage)
Functions
| Print a string without a trailing newline. | |
| println | Print a string followed by a newline. |
| print_char | Print a single character to stdout. |
| print_int | Print a signed 64-bit integer to stdout. |
| print_uint | |
| print_float | Print a double to stdout. |
| print_hex | |
| print_oct | |
| print_ptr | Print the address a reference points at ("(nil)" for null). |
| println_int | Print a signed 64-bit integer followed by newline. |
| println_uint | |
| println_float | Print a double followed by newline. |
| println_char | |
| eprint | Print a string to stderr without a trailing newline. |
| eprintln | Print a string to stderr followed by a newline. |
| eprint_int | |
| eprint_float | |
| io_fmt_int | All return the number of characters written (excluding NUL), or -1 on error. |
| io_fmt_uint | |
| io_fmt_float | |
| io_fmt_float_prec | |
| io_fmt_hex | |
| io_fmt_str | |
| io_getchar | Read a single character from stdin. Returns the character or SC_EOF. |
| io_ungetc | Push a character back onto stdin so the next io_getchar/io_scan_* returns it. |
| io_read_line | Read a line (up to buf.len-1 chars + NUL) from stdin into buf. Returns number of characters read (excluding NUL), or -1 on EOF/error. |
| io_read_token | Read a whitespace-delimited token from stdin. Returns number of characters read (0 = EOF before token, -1 = error). |
| io_scan_int | Parse a signed decimal integer from stdin. Returns 1 on success, 0 on error. |
| io_scan_uint | Parse an unsigned decimal integer from stdin. Returns 1 on success. |
| io_scan_float | Parse a floating-point number from stdin. Returns 1 on success. |
| io_remove | Remove (delete) a file. Returns 0 on success, non-zero on error. |
| io_rename | Rename / move a file. Returns 0 on success, non-zero on error. |
| io_tmpfile | Create a temporary file; returns file handle or NULL on error. |
| flush_stdout | Flush stdout — call before program exit if using print() without println(). |
| flush_stderr | Flush stderr. |
Macros
| SC_SEEK_SET | |
| SC_SEEK_CUR | |
| SC_SEEK_END | |
| SC_EOF |