From 3b696fc431a9c3f2aa7ea4f27aec20ce5dd67859 Mon Sep 17 00:00:00 2001 From: spicyjpeg Date: Thu, 11 May 2023 19:11:35 +0200 Subject: Add C++ standard library headers, update beginner/cppdemo --- libpsn00b/include/cstdio | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 libpsn00b/include/cstdio (limited to 'libpsn00b/include/cstdio') diff --git a/libpsn00b/include/cstdio b/libpsn00b/include/cstdio new file mode 100644 index 0000000..800d1a2 --- /dev/null +++ b/libpsn00b/include/cstdio @@ -0,0 +1,32 @@ +/* + * PSn00bSDK standard library + * (C) 2019-2023 Lameguy64, spicyjpeg - MPL licensed + */ + +#pragma once + +#include + +namespace std { +extern "C" { + +/* String I/O API (provided by BIOS) */ + +int printf(const char *fmt, ...); +char *gets(char *str); +void puts(const char *str); +int getchar(void); +void putchar(int ch); + +/* String formatting API (built-in) */ + +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, ...); +int snprintf(char *string, unsigned int size, const char *fmt, ...); + +int vsscanf(const char *str, const char *format, va_list ap); +int sscanf(const char *str, const char *fmt, ...); + +} +} -- cgit v1.2.3