fix for smbClose
[libogc.git] / gc / gctypes.h
blobaafea8648adcbef01ae50a6f1008e62cfae7eba2
1 #ifndef __GCTYPES_H__
2 #define __GCTYPES_H__
4 /*! \file gctypes.h
5 \brief Data type definitions
7 */
9 #include <stdbool.h>
11 #ifdef __cplusplus
12 extern "C" {
13 #endif /* __cplusplus */
15 /*+----------------------------------------------------------------------------------------------+*/
16 typedef unsigned char u8; ///< 8bit unsigned integer
17 typedef unsigned short u16; ///< 16bit unsigned integer
18 typedef unsigned int u32; ///< 32bit unsigned integer
19 typedef unsigned long long u64; ///< 64bit unsigned integer
20 /*+----------------------------------------------------------------------------------------------+*/
21 typedef signed char s8; ///< 8bit signed integer
22 typedef signed short s16; ///< 16bit signed integer
23 typedef signed int s32; ///< 32bit signed integer
24 typedef signed long long s64; ///< 64bit signed integer
25 /*+----------------------------------------------------------------------------------------------+*/
26 typedef volatile unsigned char vu8; ///< 8bit unsigned volatile integer
27 typedef volatile unsigned short vu16; ///< 16bit unsigned volatile integer
28 typedef volatile unsigned int vu32; ///< 32bit unsigned volatile integer
29 typedef volatile unsigned long long vu64; ///< 64bit unsigned volatile integer
30 /*+----------------------------------------------------------------------------------------------+*/
31 typedef volatile signed char vs8; ///< 8bit signed volatile integer
32 typedef volatile signed short vs16; ///< 16bit signed volatile integer
33 typedef volatile signed int vs32; ///< 32bit signed volatile integer
34 typedef volatile signed long long vs64; ///< 64bit signed volatile integer
35 /*+----------------------------------------------------------------------------------------------+*/
36 // fixed point math typedefs
37 typedef s16 sfp16; ///< signed 8:8 fixed point
38 typedef s32 sfp32; ///< signed 20:8 fixed point
39 typedef u16 ufp16; ///< unsigned 8:8 fixed point
40 typedef u32 ufp32; ///< unsigned 24:8 fixed point
41 /*+----------------------------------------------------------------------------------------------+*/
42 typedef float f32;
43 typedef double f64;
44 /*+----------------------------------------------------------------------------------------------+*/
45 typedef volatile float vf32;
46 typedef volatile double vf64;
47 /*+----------------------------------------------------------------------------------------------+*/
50 typedef unsigned int BOOL;
51 /*+----------------------------------------------------------------------------------------------+*/
52 // alias type typedefs
53 #define FIXED s32 ///< Alias type for sfp32
54 /*+----------------------------------------------------------------------------------------------+*/
55 // boolean defines
56 #ifndef boolean
57 #define boolean u8
58 #endif
59 /*+----------------------------------------------------------------------------------------------+*/
60 #ifndef TRUE
61 #define TRUE 1 ///< True
62 #endif
63 /*+----------------------------------------------------------------------------------------------+*/
64 #ifndef FALSE
65 #define FALSE 0 ///< False
66 #endif
67 /*+----------------------------------------------------------------------------------------------+*/
68 #ifndef NULL
69 #define NULL 0 ///< Pointer to 0
70 #endif
71 /*+----------------------------------------------------------------------------------------------+*/
72 #ifndef LITTLE_ENDIAN
73 #define LITTLE_ENDIAN 3412
74 #endif /* LITTLE_ENDIAN */
75 /*+----------------------------------------------------------------------------------------------+*/
76 #ifndef BIG_ENDIAN
77 #define BIG_ENDIAN 1234
78 #endif /* BIGE_ENDIAN */
79 /*+----------------------------------------------------------------------------------------------+*/
80 #ifndef BYTE_ORDER
81 #define BYTE_ORDER BIG_ENDIAN
82 #endif /* BYTE_ORDER */
83 /*+----------------------------------------------------------------------------------------------+*/
86 //! argv structure
87 /*! \struct __argv
89 structure used to set up argc/argv
92 struct __argv {
93 int argvMagic; //!< argv magic number, set to 0x5f617267 ('_arg') if valid
94 char *commandLine; //!< base address of command line, set of null terminated strings
95 int length;//!< total length of command line
96 int argc;
97 char **argv;
98 char **endARGV;
101 //! Default location for the system argv structure.
102 extern struct __argv *__system_argv;
104 // argv struct magic number
105 #define ARGV_MAGIC 0x5f617267
107 #ifdef __cplusplus
109 #endif /* __cplusplus */
111 #endif /* TYPES_H */
114 /* END OF FILE */