00001 #ifndef _GIF_LIB_PRIVATE_H
00002 #define _GIF_LIB_PRIVATE_H
00003
00004 #include "gif_lib.h"
00005 #include "gif_hash.h"
00006
00007 #define PROGRAM_NAME "GIFLIB"
00008
00009 #define LZ_MAX_CODE 4095
00010 #define LZ_BITS 12
00011
00012 #define FLUSH_OUTPUT 4096
00013 #define FIRST_CODE 4097
00014 #define NO_SUCH_CODE 4098
00015
00016 #define FILE_STATE_WRITE 0x01
00017 #define FILE_STATE_SCREEN 0x02
00018 #define FILE_STATE_IMAGE 0x04
00019 #define FILE_STATE_READ 0x08
00020
00021 #define IS_READABLE(Private) (Private->FileState & FILE_STATE_READ)
00022 #define IS_WRITEABLE(Private) (Private->FileState & FILE_STATE_WRITE)
00023
00024
00025 typedef struct GifFilePrivateType {
00026 int FileState,
00027 FileHandle,
00028 BitsPerPixel,
00029 ClearCode,
00030 EOFCode,
00031 RunningCode,
00032 RunningBits,
00033 MaxCode1,
00034 LastCode,
00035 CrntCode,
00036 StackPtr,
00037 CrntShiftState;
00038 unsigned long CrntShiftDWord;
00039 unsigned long PixelCount;
00040 FILE *File;
00041 InputFunc Read;
00042 OutputFunc Write;
00043 GifByteType Buf[256];
00044 GifByteType Stack[LZ_MAX_CODE];
00045 GifByteType Suffix[LZ_MAX_CODE+1];
00046 unsigned int Prefix[LZ_MAX_CODE+1];
00047 GifHashTableType *HashTable;
00048 } GifFilePrivateType;
00049
00050 extern int _GifError;
00051
00052
00053 #endif