diff options
| author | spicyjpeg <thatspicyjpeg@gmail.com> | 2023-04-05 01:30:55 +0200 |
|---|---|---|
| committer | spicyjpeg <thatspicyjpeg@gmail.com> | 2023-04-05 01:30:55 +0200 |
| commit | b4242acc35c522bd4d4a951a84933ba6f80d2015 (patch) | |
| tree | 02cdff7a11329a7445baae489dd2b38225b12d96 /libpsn00b/include/stdio.h | |
| parent | 651415f5b549b363dec971e2ef589cce098ee1f2 (diff) | |
| download | psn00bsdk-b4242acc35c522bd4d4a951a84933ba6f80d2015.tar.gz | |
Clean up all headers, add and rename some BIOS APIs
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 |
