|
Blender V2.27
|
00001 00034 #ifndef IMBUF_H 00035 #define IMBUF_H 00036 00037 #include <stdlib.h> 00038 #include <sys/types.h> 00039 #include <stdio.h> 00040 00041 #ifndef WIN32 00042 #include <unistd.h> 00043 #endif 00044 00045 #include <fcntl.h> 00046 #include <sys/stat.h> 00047 #include <string.h> 00048 #include <math.h> 00049 00050 #ifndef WIN32 00051 #include <sys/mman.h> 00052 #endif 00053 00054 #if !defined(WIN32) 00055 #define O_BINARY 0 00056 #endif 00057 00058 #define SWAP_SHORT(x) (((x & 0xff) << 8) | ((x >> 8) & 0xff)) 00059 #define SWAP_LONG(x) (((x) << 24) | (((x) & 0xff00) << 8) | (((x) >> 8) & 0xff00) | (((x) >> 24) & 0xff)) 00060 00061 #define ENDIAN_NOP(x) (x) 00062 00063 #if defined(__sgi) || defined(__sparc) || defined(__sparc__) || defined (__PPC__) || defined (__hppa__) || (defined (__APPLE__) && !defined(__LITTLE_ENDIAN__)) 00064 #define LITTLE_SHORT SWAP_SHORT 00065 #define LITTLE_LONG SWAP_LONG 00066 #define BIG_SHORT ENDIAN_NOP 00067 #define BIG_LONG ENDIAN_NOP 00068 #else 00069 #define LITTLE_SHORT ENDIAN_NOP 00070 #define LITTLE_LONG ENDIAN_NOP 00071 #define BIG_SHORT SWAP_SHORT 00072 #define BIG_LONG SWAP_LONG 00073 #endif 00074 00075 typedef unsigned char uchar; 00076 00077 #define TRUE 1 00078 #define FALSE 0 00079 00080 #endif /* IMBUF_H */ 00081
1.7.3