--- parser3/src/classes/gd/Attic/gifio.C 2002/02/08 08:30:11 1.18 +++ parser3/src/classes/gd/Attic/gifio.C 2003/03/18 15:14:15 1.21.2.2.2.1 @@ -1,11 +1,9 @@ /** @file Parser: image manipulations impl2. - Copyright (c) 2001, 2002 ArtLebedev Group (http://www.artlebedev.com) + Copyright (c) 2001-2003 ArtLebedev Group (http://www.artlebedev.com) Author: Alexandr Petrosian (http://paf.design.ru) - $Id: gifio.C,v 1.18 2002/02/08 08:30:11 paf Exp $ - based on: gd Written by Tom Boutell, 5/94. @@ -37,15 +35,17 @@ ** CompuServe Incorporated. */ +static const char* IDENT_GIFIO_C="$Date: 2003/03/18 15:14:15 $"; + #include "gif.h" static int colorstobpp(int colors); -void gdImage::Gif(String& out) +void gdImage::GifString& out) { int BitsPerPixel = colorstobpp(colorsTotal); /* Clear any old values in statics strewn through the GIF code */ - gdGifEncoder encoder(pool(), *this, out); + gdGifEncoder encoder(pool, *this, out); /* All set, let's do it. */ encoder.encode( sx, sy, interlace, 0, transparent, BitsPerPixel, @@ -328,7 +328,7 @@ gdGifEncoder::encode(int GWidth, int GHe */ void gdGifEncoder::Putbyte(int c) { - char *p=(char *)malloc(1); + char *p=new char[1]; *p=c; fp.APPEND_AS_IS(p, 1, 0, 0); } @@ -338,14 +338,14 @@ gdGifEncoder::Putbyte(int c) { void gdGifEncoder::Putword(int w) { - char *p=(char *)malloc(2); + char *p=new char[2]; p[0]=w & 0xff; p[1]=(w / 256) & 0xff; fp.APPEND_AS_IS(p, 2, 0, 0); } void gdGifEncoder::Write(void *buf, size_t size) { - char *p=(char *)malloc(size); + char *p=new char[size]; memcpy(p, buf, size); fp.APPEND_AS_IS(p, size, 0, 0); } @@ -681,7 +681,7 @@ void } } -gdGifEncoder::gdGifEncoder(Pool& pool, gdImage& aim, String& afp) : Pooled(pool), +gdGifEncoder::gdGifEncoder(gdImage& aim, String& afp): pool(), im(aim), fp(afp) { /* Some of these are properly initialized later. What I'm doing