diff options
Diffstat (limited to 'common.h')
-rw-r--r-- | common.h | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -24,6 +24,13 @@ #define MIN(x, y) ((x) > (y) ? (y) : (x)) #define ARRAY_ELEMS(arr) (sizeof(arr) / sizeof(*arr)) +#define SWAP(x, y, type) \ +do { \ + type tmp = x; \ + x = y; \ + y = tmp; \ +} while (0) + #include <stdio.h> #include <stdlib.h> #include <stdint.h> |