comparison src/dgif_lib.c @ 377:d883f39b8495 r21-2b4

Import from CVS: tag r21-2b4
author cvs
date Mon, 13 Aug 2007 11:05:42 +0200
parents 33bdb3d4b97f
children 8626e4521993
comparison
equal deleted inserted replaced
376:e2295b4d9f2e 377:d883f39b8495
108 GifRead(Buf, GIF_STAMP_LEN, GifFile); 108 GifRead(Buf, GIF_STAMP_LEN, GifFile);
109 109
110 /* The GIF Version number is ignored at this time. Maybe we should do */ 110 /* The GIF Version number is ignored at this time. Maybe we should do */
111 /* something more useful with it. */ 111 /* something more useful with it. */
112 Buf[GIF_STAMP_LEN] = 0; 112 Buf[GIF_STAMP_LEN] = 0;
113 if (strncmp(GIF_STAMP, Buf, GIF_VERSION_POS) != 0) { 113 if (strncmp(GIF_STAMP, (const char *) Buf, GIF_VERSION_POS) != 0) {
114 GifInternError(GifFile, D_GIF_ERR_NOT_GIF_FILE); 114 GifInternError(GifFile, D_GIF_ERR_NOT_GIF_FILE);
115 } 115 }
116 116
117 DGifGetScreenDesc(GifFile); 117 DGifGetScreenDesc(GifFile);
118 } 118 }
854 sp->ImageDesc.ColorMap = 854 sp->ImageDesc.ColorMap =
855 MakeMapObject(CopyFrom->ImageDesc.ColorMap->ColorCount, 855 MakeMapObject(CopyFrom->ImageDesc.ColorMap->ColorCount,
856 CopyFrom->ImageDesc.ColorMap->Colors); 856 CopyFrom->ImageDesc.ColorMap->Colors);
857 857
858 /* next, the raster */ 858 /* next, the raster */
859 sp->RasterBits = (char *)malloc(sizeof(GifPixelType) 859 sp->RasterBits = (GifPixelType*)malloc(sizeof(GifPixelType)
860 * CopyFrom->ImageDesc.Height 860 * CopyFrom->ImageDesc.Height
861 * CopyFrom->ImageDesc.Width); 861 * CopyFrom->ImageDesc.Width);
862 memcpy(sp->RasterBits, 862 memcpy(sp->RasterBits,
863 CopyFrom->RasterBits, 863 CopyFrom->RasterBits,
864 sizeof(GifPixelType) 864 sizeof(GifPixelType)