diff options
Diffstat (limited to 'libpsn00b/include/stdio.h')
| -rw-r--r-- | libpsn00b/include/stdio.h | 41 |
1 files changed, 13 insertions, 28 deletions
diff --git a/libpsn00b/include/stdio.h b/libpsn00b/include/stdio.h index 8aaf4c7..1bb5b74 100644 --- a/libpsn00b/include/stdio.h +++ b/libpsn00b/include/stdio.h @@ -1,39 +1,26 @@ -#ifndef _STDIO_H -#define _STDIO_H +/* + * PSn00bSDK standard library + * (C) 2019-2023 Lameguy64, spicyjpeg - MPL licensed + */ -#include <stdarg.h> +#pragma once -// BIOS seek modes -#ifndef SEEK_SET -#define SEEK_SET 0 -#endif -#ifndef SEEK_CUR -#define SEEK_CUR 1 -#endif -#ifndef SEEK_END -#define SEEK_END 2 /* warning: reportedly buggy */ -#endif +#include <stdarg.h> #ifdef __cplusplus extern "C" { #endif -// The following functions use the BIOS -extern void printf (const char *__format, ...); - -extern int getc(int __fd); -extern int putc(int __char, int __fd); +/* String I/O API (provided by BIOS) */ -#define fputc(__char, __fd) putc(__char, __fd) -#define fgetc(__char, __fd) getc(__char, __fd) +int printf(const char *fmt, ...); +char *gets(char *str); +void puts(const char *str); +int getchar(void); +void putchar(int ch); -// Console TTY -extern void gets(char *__s); -extern void puts(const char *__s); -extern int getchar(void); -extern void putchar(int __c); +/* String formatting API (built-in) */ -// The following functions do not use the BIOS int vsnprintf(char *string, unsigned int size, const char *fmt, va_list ap); int vsprintf(char *string, const char *fmt, va_list ap); int sprintf(char *string, const char *fmt, ...); @@ -45,5 +32,3 @@ int sscanf(const char *str, const char *fmt, ...); #ifdef __cplusplus } #endif - -#endif // _STDIO_H
\ No newline at end of file |
