pi_swap.h
Go to the documentation of this file.00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 #ifndef PI_SwapMem_h
00014 #define PI_SwapMem_h
00015 
00016 #ifdef IntelMode
00017 #if defined(__cplusplus)
00018 extern "C" {
00019 #endif
00020 #define SwapLong(b) (*((unsigned long *)(b))) = ((unsigned long)(((unsigned char *)(b))[3]))         | (((unsigned long)(((unsigned char *)(b))[2])) << 8) | \
00021                         (((unsigned long)(((unsigned char *)(b))[1])) << 16) | (((unsigned long)(((unsigned char *)(b))[0])) << 24);
00022 #define SwapShort(b) (*((unsigned short *)(b))) = ((unsigned short)(((unsigned char *)(b))[1])) | ((unsigned short)(((unsigned char *)(b))[0] << 8));
00023 
00024 void SwapLongOffset( void *p, unsigned long a, unsigned long b); 
00025 void SwapShortOffset( void *p, unsigned long a, unsigned long b);
00026 
00027 #if defined(__cplusplus)
00028 }
00029 #endif
00030 #endif
00031 #endif
Generated on Sat May 15 19:41:14 2004 for test by
 1.3.7
 1.3.7