aboutsummaryrefslogtreecommitdiff
path: root/libpsn00b/include/cstdio
diff options
context:
space:
mode:
authorspicyjpeg <thatspicyjpeg@gmail.com>2023-05-11 23:42:43 +0200
committerGitHub <noreply@github.com>2023-05-11 23:42:43 +0200
commit04d7728350cbd04dd86cd894e906c98673e3f9a7 (patch)
tree08e8c7dd495d1c4c6fcf5f7ba6b4b10693dc42f6 /libpsn00b/include/cstdio
parenteaec942f56ceec9c14de5c4185a02602abadd50a (diff)
parent58a8306d24fe29d965aa8b40ddc37c3163c0a2f9 (diff)
downloadpsn00bsdk-04d7728350cbd04dd86cd894e906c98673e3f9a7.tar.gz
Merge pull request #70 from Lameguy64/v0.23-wip
Header cleanups, PCDRV, more safety checks, libc and mkpsxiso fixes (v0.23)
Diffstat (limited to 'libpsn00b/include/cstdio')
-rw-r--r--libpsn00b/include/cstdio32
1 files changed, 32 insertions, 0 deletions
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 <cstdarg>
+
+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, ...);
+
+}
+}