Main Page   Compound List   File List   Compound Members   File Members  

mainDefs.h

Go to the documentation of this file.
00001 
00012 #ifndef MAINDEFS_H
00013 #define MAINDEFS_H
00014 
00015 #if defined WIN32
00016   typedef unsigned __int64 uns64;
00017 #elif defined LINUX32
00018   #include <stdint.h>
00019   typedef uint64_t uns64;
00020 #else
00021   #error No undertood architectures defined
00022 #endif
00023 
00024 typedef unsigned int uns32;
00025 typedef unsigned short uns16;
00026 typedef unsigned char uns8;
00027 
00028 #define ROLuns32(a,b)\
00029   (( ((a) << ((b) & 31)) | ((a) >> (32-((b) & 31))) ))
00030 #define RORuns32(a,b)\
00031   (( ((a) >> ((b) & 31)) | ((a) << (32-((b) & 31))) ))
00032 
00033 #define ROLuns64(a,b)\
00034   ( ((a) << ((b) & 63)) | ((a) >> (64-((b) & 63))) )
00035 #define RORuns64(a,b)\
00036   ( ((a) >> ((b) & 63)) | ((a) << (64-((b) & 63))) )
00037 
00038 #ifndef WIN32
00039   #define max(AA,BB)\
00040    ( (AA)<(BB) ? BB : AA )
00041 #endif
00042   
00043 #define ck_free(PTR,SIZE)\
00044   {\
00045   memset(PTR, 0, SIZE);\
00046   free(PTR);\
00047   PTR = NULL;\
00048   }
00049 
00050   
00051 #endif
GPL