Lucciefr
Lua code caving, injection and exploration framework
macro.h
Go to the documentation of this file.
1 
3 #ifndef MACRO_H
4 #define MACRO_H
5 
6 /* utility macros */
7 
9 #ifndef UNUSED
10  #define UNUSED(x) (void)(x)
11 #endif
12 
14 #define lengthof(array) (sizeof(array) / sizeof(array[0]))
15 
29 #define TRY do
30 #define FINALLY while (0);
32 
33 
35 #ifndef MAX
36  #define MAX(x, y) ((x) > (y) ? (x) : (y))
37 #endif
38 #ifndef MIN
40  #define MIN(x, y) ((x) < (y) ? (x) : (y))
41 #endif
42 #ifndef ABS
44  #define ABS(a) ((a) < 0 ? -(a) : (a))
45 #endif
46 
47 #endif // MACRO_H