RetroArch
gctypes.h
Go to the documentation of this file.
1 #ifndef __GCTYPES_H__
2 #define __GCTYPES_H__
3 
9 #include <stdbool.h>
10 #include <stdint.h>
11 
12 #ifdef __cplusplus
13  extern "C" {
14 #endif /* __cplusplus */
15 
16 /*+----------------------------------------------------------------------------------------------+*/
17 typedef uint8_t u8;
18 typedef uint16_t u16;
19 typedef uint32_t u32;
20 typedef uint64_t u64;
21 /*+----------------------------------------------------------------------------------------------+*/
22 typedef int8_t s8;
23 typedef int16_t s16;
24 typedef int32_t s32;
25 typedef int64_t s64;
26 /*+----------------------------------------------------------------------------------------------+*/
27 typedef volatile u8 vu8;
28 typedef volatile u16 vu16;
29 typedef volatile u32 vu32;
30 typedef volatile u64 vu64;
31 /*+----------------------------------------------------------------------------------------------+*/
32 typedef volatile s8 vs8;
33 typedef volatile s16 vs16;
34 typedef volatile s32 vs32;
35 typedef volatile s64 vs64;
36 /*+----------------------------------------------------------------------------------------------+*/
37 // fixed point math typedefs
38 typedef s16 sfp16;
39 typedef s32 sfp32;
40 typedef u16 ufp16;
41 typedef u32 ufp32;
42 /*+----------------------------------------------------------------------------------------------+*/
43 typedef float f32;
44 typedef double f64;
45 /*+----------------------------------------------------------------------------------------------+*/
46 typedef volatile float vf32;
47 typedef volatile double vf64;
48 /*+----------------------------------------------------------------------------------------------+*/
49 
50 
51 typedef unsigned int BOOL;
52 /*+----------------------------------------------------------------------------------------------+*/
53 // alias type typedefs
54 #define FIXED s32
55 /*+----------------------------------------------------------------------------------------------+*/
56 #ifndef TRUE
57 #define TRUE 1
58 #endif
59 /*+----------------------------------------------------------------------------------------------+*/
60 #ifndef FALSE
61 #define FALSE 0
62 #endif
63 /*+----------------------------------------------------------------------------------------------+*/
64 #ifndef NULL
65 #define NULL 0
66 #endif
67 /*+----------------------------------------------------------------------------------------------+*/
68 #ifndef LITTLE_ENDIAN
69 #define LITTLE_ENDIAN 3412
70 #endif /* LITTLE_ENDIAN */
71 /*+----------------------------------------------------------------------------------------------+*/
72 #ifndef BIG_ENDIAN
73 #define BIG_ENDIAN 1234
74 #endif /* BIGE_ENDIAN */
75 /*+----------------------------------------------------------------------------------------------+*/
76 #ifndef BYTE_ORDER
77 #define BYTE_ORDER BIG_ENDIAN
78 #endif /* BYTE_ORDER */
79 /*+----------------------------------------------------------------------------------------------+*/
80 
81 
83 
88 struct __argv {
89  int argvMagic;
90  char *commandLine;
91  int length;
92  int argc;
93  char **argv;
94  char **endARGV;
95 };
96 
98 extern struct __argv *__system_argv;
99 
100 // argv struct magic number
101 #define ARGV_MAGIC 0x5f617267
102 
103 #ifdef __cplusplus
104  }
105 #endif /* __cplusplus */
106 
107 #endif /* TYPES_H */
108 
109 
110 /* END OF FILE */
volatile float vf32
Definition: gctypes.h:46
struct __argv * __system_argv
Default location for the system argv structure.
Definition: ctr_system.c:137
volatile double vf64
Definition: gctypes.h:47
int32_t s32
32bit signed integer
Definition: gctypes.h:24
volatile u8 vu8
8bit unsigned volatile integer
Definition: gctypes.h:27
char * commandLine
base address of command line, set of null terminated strings
Definition: gctypes.h:90
int argc
Definition: gctypes.h:92
float f32
Definition: gctypes.h:43
volatile s8 vs8
8bit signed volatile integer
Definition: gctypes.h:32
int8_t s8
8bit signed integer
Definition: gctypes.h:22
char ** endARGV
Definition: gctypes.h:94
s16 sfp16
signed 8:8 fixed point
Definition: gctypes.h:38
char ** argv
Definition: gctypes.h:93
int length
total length of command line
Definition: gctypes.h:91
volatile s32 vs32
32bit signed volatile integer
Definition: gctypes.h:34
double f64
Definition: gctypes.h:44
uint16_t u16
16bit unsigned integer
Definition: gctypes.h:18
volatile s64 vs64
64bit signed volatile integer
Definition: gctypes.h:35
s32 sfp32
signed 20:8 fixed point
Definition: gctypes.h:39
argv structure
Definition: gctypes.h:88
signed short int16_t
Definition: stdint.h:122
signed int int32_t
Definition: stdint.h:123
u16 ufp16
unsigned 8:8 fixed point
Definition: gctypes.h:40
int argvMagic
argv magic number, set to 0x5f617267 ('_arg') if valid
Definition: gctypes.h:89
int16_t s16
16bit signed integer
Definition: gctypes.h:23
unsigned int BOOL
Definition: gctypes.h:51
uint64_t u64
64bit unsigned integer
Definition: gctypes.h:20
volatile u64 vu64
64bit unsigned volatile integer
Definition: gctypes.h:30
signed __int64 int64_t
Definition: stdint.h:135
volatile u32 vu32
32bit unsigned volatile integer
Definition: gctypes.h:29
u32 ufp32
unsigned 24:8 fixed point
Definition: gctypes.h:41
volatile s16 vs16
16bit signed volatile integer
Definition: gctypes.h:33
uint8_t u8
8bit unsigned integer
Definition: gctypes.h:17
uint32_t u32
32bit unsigned integer
Definition: gctypes.h:19
unsigned short uint16_t
Definition: stdint.h:125
unsigned __int64 uint64_t
Definition: stdint.h:136
unsigned char uint8_t
Definition: stdint.h:124
unsigned int uint32_t
Definition: stdint.h:126
int64_t s64
64bit signed integer
Definition: gctypes.h:25
signed char int8_t
Definition: stdint.h:121
volatile u16 vu16
16bit unsigned volatile integer
Definition: gctypes.h:28