diff options
Diffstat (limited to 'include/generic.h')
-rw-r--r-- | include/generic.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/include/generic.h b/include/generic.h index 964501f..f20eeb7 100644 --- a/include/generic.h +++ b/include/generic.h @@ -74,10 +74,10 @@ typedef unsigned _int64 uint64; #ifndef PACKED #if defined __linux__ || defined __CYGWIN32__ #define PACKED __attribute__((packed)) -#else +#else // PACKED #define PACKED #endif -#endif +#endif // !PACKED extern char verbosity; char ** split(char * s, char t); @@ -98,7 +98,8 @@ inline T MIN(T a, T b) { } #endif -#else +#else // cplusplus + #ifndef MAX #define MAX(__a,__b) ((__a)<(__b)?(__b):(__a)) #endif @@ -107,11 +108,11 @@ inline T MIN(T a, T b) { #define MIN(__a,__b) ((__a)>(__b)?(__b):(__a)) #endif -#endif +#endif // !cplusplus #define BITCOUNT(x) (((BX_(x)+(BX_(x)>>4)) & 0x0F0F0F0F) % 255) -#define BX_(x) ((x) - (((x)>>1)&0x77777777) \ - - (((x)>>2)&0x33333333) \ +#define BX_(x) ((x) - (((x)>>1)&0x77777777) \ + - (((x)>>2)&0x33333333) \ - (((x)>>3)&0x11111111)) #define ISPOT(x) (((x)&(x-1))==0?1:0) |