diff options
Diffstat (limited to 'apps/plugins/rockboy/rockmacros.h')
-rw-r--r-- | apps/plugins/rockboy/rockmacros.h | 88 |
1 files changed, 88 insertions, 0 deletions
diff --git a/apps/plugins/rockboy/rockmacros.h b/apps/plugins/rockboy/rockmacros.h new file mode 100644 index 0000000000..63f9b106e9 --- /dev/null +++ b/apps/plugins/rockboy/rockmacros.h | |||
@@ -0,0 +1,88 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2005 Michiel van der Kolk, Jens Arnold | ||
11 | * | ||
12 | * All files in this archive are subject to the GNU General Public License. | ||
13 | * See the file COPYING in the source tree root for full license agreement. | ||
14 | * | ||
15 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
16 | * KIND, either express or implied. | ||
17 | * | ||
18 | ****************************************************************************/ | ||
19 | |||
20 | #include <plugin.h> | ||
21 | |||
22 | /* workaround for cygwin not defining endian macros */ | ||
23 | #if !defined(LITTLE_ENDIAN) && !defined(BIG_ENDIAN) && defined(_X86_) | ||
24 | #define LITTLE_ENDIAN | ||
25 | #endif | ||
26 | |||
27 | #define malloc(a) my_malloc(a) | ||
28 | void *my_malloc(size_t size); | ||
29 | |||
30 | extern struct plugin_api* rb; | ||
31 | extern int shut,cleanshut; | ||
32 | void vid_update(int scanline); | ||
33 | void vid_init(void); | ||
34 | void vid_begin(void); | ||
35 | void vid_end(void); | ||
36 | void die(char *message, ...); | ||
37 | void setmallocpos(void *pointer); | ||
38 | void vid_settitle(char *title); | ||
39 | void *sys_timer(void); | ||
40 | int sys_elapsed(long *oldtick); | ||
41 | void sys_sleep(int us); | ||
42 | int pcm_submit(void); | ||
43 | void pcm_init(void); | ||
44 | void doevents(void); | ||
45 | int isupper(int c); | ||
46 | int isdigit(int c); | ||
47 | void ev_poll(void); | ||
48 | |||
49 | #ifdef SIMULATOR | ||
50 | #undef opendir | ||
51 | #define opendir(a) rb->sim_opendir((a)) | ||
52 | #undef closedir | ||
53 | #define closedir(a) rb->sim_closedir((a)) | ||
54 | #undef mkdir | ||
55 | #define mkdir(a,b) rb->sim_mkdir((a),(b)) | ||
56 | #undef open | ||
57 | #define open(a,b) rb->sim_open((a),(b)) | ||
58 | #undef lseek | ||
59 | #define lseek(a,b,c) rb->sim_lseek((a),(b),(c)) | ||
60 | #else /* !SIMULATOR */ | ||
61 | #define opendir(a) rb->opendir((a)) | ||
62 | #define closedir(a) rb->closedir((a)) | ||
63 | #define mkdir(a,b) rb->mkdir((a),(b)) | ||
64 | #define open(a,b) rb->open((a),(b)) | ||
65 | #define lseek(a,b,c) rb->lseek((a),(b),(c)) | ||
66 | #endif /* !SIMULATOR */ | ||
67 | |||
68 | #define strcat(a,b) rb->strcat((a),(b)) | ||
69 | #define close(a) rb->close((a)) | ||
70 | #define read(a,b,c) rb->read((a),(b),(c)) | ||
71 | #define write(a,b,c) rb->write((a),(b),(c)) | ||
72 | #define memset(a,b,c) rb->memset((a),(b),(c)) | ||
73 | #define memcpy(a,b,c) rb->memcpy((a),(b),(c)) | ||
74 | #define strcpy(a,b) rb->strcpy((a),(b)) | ||
75 | #define strncpy(a,b,c) rb->strncpy((a),(b),(c)) | ||
76 | #define strlen(a) rb->strlen((a)) | ||
77 | #define strcmp(a,b) rb->strcmp((a),(b)) | ||
78 | #define strchr(a,b) rb->strchr((a),(b)) | ||
79 | #define strrchr(a,b) rb->strrchr((a),(b)) | ||
80 | #define strcasecmp(a,b) rb->strcasecmp((a),(b)) | ||
81 | #define srand(a) rb->srand((a)) | ||
82 | #define rand() rb->rand() | ||
83 | #define atoi(a) rb->atoi((a)) | ||
84 | #define strcat(a,b) rb->strcat((a),(b)) | ||
85 | #define snprintf(...) rb->snprintf(__VA_ARGS__) | ||
86 | #define fprintf(...) rb->fdprintf(__VA_ARGS__) | ||
87 | #define tolower(_A_) (isupper(_A_) ? (_A_ - 'A' + 'a') : _A_) | ||
88 | |||