|
GBDK 2020 Docs
4.4.0
API Documentation for GBDK 2020
|
#include <types.h>Go to the source code of this file.
Functions | |
| void | putchar (char c) OLDCALL REENTRANT |
| void | printf (const char *format,...) |
| void | sprintf (char *str, const char *format,...) |
| void | puts (const char *s) |
| char * | gets (char *s) OLDCALL |
| char | getchar (void) OLDCALL |
Basic file/console input output functions.
Including stdio.h will use a large number of the background tiles for font characters. If stdio.h is not included then that space will be available for use with other tiles instead.
| void putchar | ( | char | c | ) |
Print char to stdout.
| c | Character to print |
| void printf | ( | const char * | format, |
| ... | |||
| ) |
Print the string and arguments given by format to stdout.
| format | The format string as per printf |
Does not return the number of characters printed.
Currently supported:
Warning: to correctly pass parameters (such as chars, ints, etc) all of them should always be explicitly cast as when calling the function. See docs_chars_varargs for more details.
| void sprintf | ( | char * | str, |
| const char * | format, | ||
| ... | |||
| ) |
Print the string and arguments given by format to a buffer.
| str | The buffer to print into |
| format | The format string as per printf |
Does not return the number of characters printed.
Warning: to correctly pass parameters (such as chars, ints, etc) all of them should always be explicitly cast as when calling the function. See docs_chars_varargs for more details.
| void puts | ( | const char * | s | ) |
puts() writes the string s and a trailing newline to stdout.
| char* gets | ( | char * | s | ) |
gets() Reads a line from stdin into a buffer pointed to by s.
| s | Buffer to store string in |
Reads until either a terminating newline or an EOF, which it replaces with '\0'. No check for buffer overrun is performed.
Returns: Buffer pointed to by s
| char getchar | ( | void | ) |
getchar() Reads and returns a single character from stdin.