stdio.h (1879B)
1/** @file stdio.h 2 Basic file/console input output functions. 3 4 Including stdio.h will use a large number of the 5 background tiles for font characters. If stdio.h 6 is not included then that space will be available 7 for use with other tiles instead. 8 */ 9#ifndef STDIO_INCLUDE 10#define STDIO_INCLUDE 11 12#include <types.h> 13 14/** Print char to stdout. 15 @param c Character to print 16 */ 17 18void putchar(char c) OLDCALL; 19 20/** Print the string and arguments given by format to stdout. 21 22 @param format The format string as per printf 23 24 Does not return the number of characters printed. 25 26 Currently supported: 27 \li \%hx (char as hex) 28 \li \%hu (unsigned char) 29 \li \%hd (signed char) 30 \li \%c (character) 31 \li \%u (unsigned int) 32 \li \%d (signed int) 33 \li \%x (unsigned int as hex) 34 \li \%s (string) 35 36 Warning: to correctly pass chars for printing as chars, they *must* 37 be explicitly re-cast as such when calling the function. 38 See @ref docs_chars_varargs for more details. 39 */ 40void printf(const char *format, ...) OLDCALL; 41 42/** Print the string and arguments given by format to a buffer. 43 44 @param str The buffer to print into 45 @param format The format string as per @ref printf 46 47 Does not return the number of characters printed. 48 */ 49void sprintf(char *str, const char *format, ...) OLDCALL; 50 51/** puts() writes the string __s__ and a trailing newline to stdout. 52*/ 53void puts(const char *s); 54 55/** gets() Reads a line from stdin into a buffer pointed to by __s__. 56 57 @param s Buffer to store string in 58 59 Reads until either a terminating newline or an EOF, which it replaces with '\0'. No 60 check for buffer overrun is performed. 61 62 Returns: Buffer pointed to by __s__ 63*/ 64char *gets(char *s) OLDCALL; 65 66/** getchar() Reads and returns a single character from stdin. 67 */ 68char getchar() OLDCALL; 69 70#endif