gif_lib_private.h

Go to the documentation of this file.
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            /* Biggest code possible in 12 bits. */
00010 #define LZ_BITS         12
00011 
00012 #define FLUSH_OUTPUT            4096    /* Impossible code, to signal flush. */
00013 #define FIRST_CODE              4097    /* Impossible code, to signal first. */
00014 #define NO_SUCH_CODE            4098    /* Impossible code, to signal empty. */
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,                          /* Where all this data goes to! */
00028         BitsPerPixel,       /* Bits per pixel (Codes uses at least this + 1). */
00029         ClearCode,                                     /* The CLEAR LZ code. */
00030         EOFCode,                                         /* The EOF LZ code. */
00031         RunningCode,                /* The next code algorithm can generate. */
00032         RunningBits,/* The number of bits required to represent RunningCode. */
00033         MaxCode1,  /* 1 bigger than max. possible code, in RunningBits bits. */
00034         LastCode,                       /* The code before the current code. */
00035         CrntCode,                                 /* Current algorithm code. */
00036         StackPtr,                        /* For character stack (see below). */
00037         CrntShiftState;                 /* Number of bits in CrntShiftDWord. */
00038     unsigned long CrntShiftDWord;     /* For bytes decomposition into codes. */
00039     unsigned long PixelCount;                  /* Number of pixels in image. */
00040     FILE *File;                                           /* File as stream. */
00041     InputFunc Read;                 /* function to read gif input (TVT) */
00042     OutputFunc Write;               /* function to write gif output (MRB) */
00043     GifByteType Buf[256];              /* Compressed input is buffered here. */
00044     GifByteType Stack[LZ_MAX_CODE];      /* Decoded pixels are stacked here. */
00045     GifByteType Suffix[LZ_MAX_CODE+1];         /* So we can trace the codes. */
00046     unsigned int Prefix[LZ_MAX_CODE+1];
00047     GifHashTableType *HashTable;
00048 } GifFilePrivateType;
00049 
00050 extern int _GifError;
00051 
00052 
00053 #endif /* _GIF_LIB_PRIVATE_H */

Generated on Tue Jul 5 14:13:32 2011 for ROOT_528-00b_version by  doxygen 1.5.1