gbdk/gbdk-lib/include/stdio.h

49 lines
1.3 KiB
C
Raw Permalink Normal View History

2015-01-10 16:25:06 +01:00
/** @file stdio.h
Basic file/console input output functions.
*/
#ifndef STDIO_INCLUDE
#define STDIO_INCLUDE
#include <types.h>
#if STRICT_ANSI
2015-01-10 16:25:09 +01:00
void putchar(int c);
2015-01-10 16:25:06 +01:00
#else
/** Put the character 'c' to stdout. */
2015-01-10 16:25:09 +01:00
void putchar(char c);
2015-01-10 16:25:06 +01:00
#endif
/** Print the string and arguments given by format to stdout.
Currently supported: \%c (character), \%u (unsigned int),
\%d (signed int), \%x (unsigned int as hex), and \%s (string).
Does not return the number of characters printed.
*/
2015-01-10 16:25:08 +01:00
void printf(const char *format, ...) NONBANKED;
2015-01-10 16:25:06 +01:00
/** Print the string and arguments given by format to a buffer.
Currently supported: \%c (character), \%u (unsigned int),
\%d (signed int), \%x (unsigned int as hex), and \%s (string).
Does not return the number of characters printed.
@param str The buffer to print into.
@param format The format string as per printf.
*/
2015-01-10 16:25:08 +01:00
void sprintf(char *str, const char *format, ...) NONBANKED;
2015-01-10 16:25:06 +01:00
/** puts() writes the string s and a trailing newline to std<74>
out.
*/
2015-01-10 16:25:08 +01:00
void puts(const char *s) NONBANKED;
2015-01-10 16:25:06 +01:00
/** gets() reads a line from stdin into the buffer pointed to by s until
either a terminating newline or EOF, which it replaces with '\0'. No
check for buffer overrun is per<EFBFBD> formed.
*/
2015-01-10 16:25:09 +01:00
char *gets(char *s);
2015-01-10 16:25:08 +01:00
/** getchar() gets a single character from stdin.
*/
2015-01-10 16:25:09 +01:00
char getchar(void);
2015-01-10 16:25:06 +01:00
#endif