PS2SDK
PS2 Homebrew Libraries
stdio.h
Go to the documentation of this file.
1 /*
2 # _____ ___ ____ ___ ____
3 # ____| | ____| | | |____|
4 # | ___| |____ ___| ____| | \ PS2DEV Open Source Project.
5 #-----------------------------------------------------------------------
6 # Copyright (c) 2003 Marcus R. Brown <mrbrown@0xd6.org>
7 # Licenced under Academic Free License version 2.0
8 # Review ps2sdk README & LICENSE files for further details.
9 */
10 
16 #ifndef __STDIO_H__
17 #define __STDIO_H__
18 
19 #include <stdarg.h>
20 #include <irx.h>
21 
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25 
26 extern int printf(const char *format, ...);
27 extern int getchar(void);
28 extern int putchar(int c);
29 extern int puts(const char *s);
30 extern char *gets(char *s);
31 extern int fdprintf(int fd, const char *format, ...);
32 extern int fdgetc(int fd);
33 extern int fdputc(int c, int fd);
34 extern int fdputs(const char *s, int fd);
35 extern char *fdgets(char *buf, int fd);
36 
37 // The following was introduced in export version 1.3 (around SDK 2.3)
38 extern int vfdprintf(int fd, const char *format, va_list ap);
39 
40 #define stdio_IMPORTS_start DECLARE_IMPORT_TABLE(stdio, 1, 2)
41 #define stdio_IMPORTS_end END_IMPORT_TABLE
42 
43 #define xstdio_IMPORTS_start DECLARE_IMPORT_TABLE(stdio, 1, 3)
44 #define xstdio_IMPORTS_end END_IMPORT_TABLE
45 
46 #define I_printf DECLARE_IMPORT(4, printf)
47 #define I_getchar DECLARE_IMPORT(5, getchar)
48 #define I_putchar DECLARE_IMPORT(6, putchar)
49 #define I_puts DECLARE_IMPORT(7, puts)
50 #define I_gets DECLARE_IMPORT(8, gets)
51 #define I_fdprintf DECLARE_IMPORT(9, fdprintf)
52 #define I_fdgetc DECLARE_IMPORT(10, fdgetc)
53 #define I_fdputc DECLARE_IMPORT(11, fdputc)
54 #define I_fdputs DECLARE_IMPORT(12, fdputs)
55 #define I_fdgets DECLARE_IMPORT(13, fdgets)
56 #define I_vfdprintf DECLARE_IMPORT(14, vfdprintf)
57 
58 #ifdef __cplusplus
59 }
60 #endif
61 
62 #endif /* __STDIO_H__ */
irx.h