diff options
| author | John Wilbert M. Villamor <lameguy64@gmail.com> | 2019-04-06 10:11:07 +0800 |
|---|---|---|
| committer | John Wilbert M. Villamor <lameguy64@gmail.com> | 2019-04-06 10:11:07 +0800 |
| commit | f3e040230772f978540a71aea43dfde200992922 (patch) | |
| tree | bd8ca31b72dd01e24980b073854e263589530f56 /libpsn00b/include/stdio.h | |
| download | psn00bsdk-f3e040230772f978540a71aea43dfde200992922.tar.gz | |
First commit
Diffstat (limited to 'libpsn00b/include/stdio.h')
| -rw-r--r-- | libpsn00b/include/stdio.h | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/libpsn00b/include/stdio.h b/libpsn00b/include/stdio.h new file mode 100644 index 0000000..5ee9e9b --- /dev/null +++ b/libpsn00b/include/stdio.h @@ -0,0 +1,47 @@ +#ifndef _STDIO_H +#define _STDIO_H + +#include <stdarg.h> + +#ifndef NULL +#define NULL (void*)0 +#endif + +// 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 + +#ifndef _SIZE_T +#define _SIZE_T +typedef unsigned int size_t; +#endif + +#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); +extern void putchar(int __c); + +// The following functions do not use the BIOS +int vsnprintf(char *string, unsigned int size, char *fmt, va_list ap); +int vsprintf(char *string, char *fmt, va_list ap); +int sprintf(char *string, char *fmt, ...); +int snprintf(char *string, unsigned int size, char *fmt, ...); + +#ifdef __cplusplus +} +#endif + +#endif // _STDIO_H
\ No newline at end of file |
