PS2SDK
PS2 Homebrew Libraries
standard.h
1 /*
2 ------------------------------------------------------------------------------
3 Standard definitions and types, Bob Jenkins
4 ------------------------------------------------------------------------------
5 */
6 #ifndef STANDARD_H
7 #define STANDARD_H
8 
9 #include <stddef.h>
10 #include <stdint.h>
11 #include <stdbool.h>
12 
13 #define UB8MAXVAL 0xffffffffffffffffLL
14 #define UB8BITS 64
15 #define SB8MAXVAL 0x7fffffffffffffffLL
16 #define UB4MAXVAL 0xffffffff
17 #define UB4BITS 32
18 #define SB4MAXVAL 0x7fffffff
19 #define UB2MAXVAL 0xffff
20 #define UB2BITS 16
21 #define SB2MAXVAL 0x7fff
22 #define UB1MAXVAL 0xff
23 #define UB1BITS 8
24 #define SB1MAXVAL 0x7f
25 
26 #define align(a) (((uint32_t)a+(sizeof(void *)-1))&(~(sizeof(void *)-1)))
27 
28 #endif /* STANDARD_H */