--- parser3/src/lib/gd/gifio.C 2015/10/26 01:21:57 1.5 +++ parser3/src/lib/gd/gifio.C 2024/11/04 03:53:25 1.11 @@ -1,8 +1,8 @@ /** @file Parser: image manipulations impl2. - Copyright (c) 2001-2015 Art. Lebedev Studio (http://www.artlebedev.com) - Author: Alexandr Petrosian (http://paf.design.ru) + Copyright (c) 2001-2024 Art. Lebedev Studio (http://www.artlebedev.com) + Authors: Konstantin Morshnev , Alexandr Petrosian based on: gd @@ -37,7 +37,7 @@ #include "gif.h" -volatile const char * IDENT_GIFIO_C="$Id: gifio.C,v 1.5 2015/10/26 01:21:57 moko Exp $"; +volatile const char * IDENT_GIFIO_C="$Id: gifio.C,v 1.11 2024/11/04 03:53:25 moko Exp $"; static int colorstobpp(int colors); @@ -424,13 +424,13 @@ typedef unsigned char char_type void gdGifEncoder::compress(int init_bits) { - register long fcode; - register code_int i /* = 0 */; - register int c; - register code_int ent; - register code_int disp; - register code_int hsize_reg; - register int hshift; + long fcode; + code_int i /* = 0 */; + int c; + code_int ent; + code_int disp; + code_int hsize_reg; + int hshift; /* * Set up the globals: g_init_bits - initial number of bits @@ -610,10 +610,10 @@ void { - register count_int *htab_p = htab+hsize; + count_int *htab_p = htab+hsize; - register long i; - register long m1 = -1; + long i; + long m1 = -1; i = hsize - 16; do { /* might use Sys V memset(3) here */ @@ -774,9 +774,6 @@ bool gdImage::CreateFromGif(FILE *fd) { int imageNumber; int BitPixel; - int ColorResolution; - int Background; - int AspectRatio; int Transparent =(-1); unsigned char buf[16]; unsigned char c; @@ -806,9 +803,6 @@ bool gdImage::CreateFromGif(FILE *fd) return false; } BitPixel = 2<<(buf[4]&0x07); - ColorResolution =(int)(((buf[4]&0x70)>>3)+1); - Background = buf[5]; - AspectRatio = buf[6]; if(BitSet(buf[4], LOCALCOLORMAP)) { /* Global Colormap */ if(ReadColorMap(fd, BitPixel, ColorMap)) { @@ -909,17 +903,13 @@ int gdImage::DoExtension(FILE *fd, int l switch(label) { case 0xf9: { /* Graphic Control Extension */ (void) GetDataBlock(fd,(unsigned char*) buf); - Gif89 gif89 = { -1, -1, -1, 0 }; // PAF:huh? - gif89.disposal =(buf[0] >> 2) & 0x7; - gif89.inputFlag =(buf[0] >> 1) & 0x1; - gif89.delayTime = LM_to_uint(buf[1],buf[2]); if((buf[0] & 0x1) != 0) *Transparent = buf[3]; while(GetDataBlock(fd,(unsigned char*) buf) != 0) ; return FALSE; - } + } default: break; } @@ -998,7 +988,7 @@ int gdImage::LWZReadByte(FILE *fd, int f static int clear_code, end_code; static int table[2][(1<< MAX_LWZ_BITS)]; static int stack[(1<<(MAX_LWZ_BITS))*2], *sp; - register int i; + int i; if(flag) { set_code_size = input_code_size;