summaryrefslogtreecommitdiff
path: root/apps/plugins/doom/rockmacros.h
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/doom/rockmacros.h')
-rw-r--r--apps/plugins/doom/rockmacros.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/apps/plugins/doom/rockmacros.h b/apps/plugins/doom/rockmacros.h
index 78574c8440..6abf025aac 100644
--- a/apps/plugins/doom/rockmacros.h
+++ b/apps/plugins/doom/rockmacros.h
@@ -33,16 +33,22 @@ extern bool doomexit;
33/* libc functions */ 33/* libc functions */
34int printf(const char *fmt, ...); 34int printf(const char *fmt, ...);
35int fileexists(const char * fname); 35int fileexists(const char * fname);
36int my_open(const char *file, int flags);
37int my_close(int id);
38char *my_strtok( char * s, const char * delim ); 36char *my_strtok( char * s, const char * delim );
39#define alloca __builtin_alloca 37#define alloca __builtin_alloca
40#define fdprintf(...) rb->fdprintf(__VA_ARGS__) 38#define fdprintf(...) rb->fdprintf(__VA_ARGS__)
41#define vsnprintf(...) rb->vsnprintf(__VA_ARGS__) 39#define vsnprintf(...) rb->vsnprintf(__VA_ARGS__)
42#define read_line(a,b,c) rb->read_line((a),(b),(c)) 40#define read_line(a,b,c) rb->read_line((a),(b),(c))
43 41
42#ifdef SIMULATOR
43#define open(a,b) rb->open((a),(b))
44#define close(a) rb->close((a))
45#else
46int my_open(const char *file, int flags);
47int my_close(int id);
44#define open(a,b) my_open((a),(b)) 48#define open(a,b) my_open((a),(b))
45#define close(a) my_close((a)) 49#define close(a) my_close((a))
50#endif
51
46#define lseek(a,b,c) rb->lseek((a),(b),(c)) 52#define lseek(a,b,c) rb->lseek((a),(b),(c))
47#define filesize(a) rb->filesize((a)) 53#define filesize(a) rb->filesize((a))
48#define read(a,b,c) rb->read((a),(b),(c)) 54#define read(a,b,c) rb->read((a),(b),(c))