X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=blobdiff_plain;f=deanimate.c;h=bba74d49bf233f8b86c6c850ec7f6b873952fc59;hp=cd4274230572f3f234880346e8bda316f72c80f6;hb=a2f8296e90e9bc3c4e4fa50c9b42e3f12bce24ca;hpb=83a4ca758c4dccd313f23f9d736f43c34e16e08a diff --git a/deanimate.c b/deanimate.c index cd427423..bba74d49 100644 --- a/deanimate.c +++ b/deanimate.c @@ -1,4 +1,3 @@ -const char deanimate_rcs[] = "$Id: deanimate.c,v 1.21 2011/09/04 11:10:56 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/deanimate.c,v $ @@ -8,7 +7,7 @@ const char deanimate_rcs[] = "$Id: deanimate.c,v 1.21 2011/09/04 11:10:56 fabian * - Deanimation of GIF images * * Copyright : Written by and Copyright (C) 2001 - 2004, 2006 by the - * SourceForge Privoxy team. http://www.privoxy.org/ + * Privoxy team. https://www.privoxy.org/ * * Based on the GIF file format specification (see * http://tronche.com/computer-graphics/gif/gif89a.html) @@ -41,13 +40,11 @@ const char deanimate_rcs[] = "$Id: deanimate.c,v 1.21 2011/09/04 11:10:56 fabian #include #include -#include "errlog.h" #include "project.h" +#include "errlog.h" #include "deanimate.h" #include "miscutil.h" -const char deanimate_h_rcs[] = DEANIMATE_H_VERSION; - /********************************************************************* * * Function : buf_free @@ -307,8 +304,8 @@ static int gif_extract_image(struct binbuffer *src, struct binbuffer *dst) * an (optional) image block and an arbitrary number * of image extension blocks, produce an output GIF with * only one image block that contains the last image - * (extenstion) block of the original. - * Also strip Comments, Application extenstions, etc. + * (extension) block of the original. + * Also strip Comments, Application extensions, etc. * * Parameters : * 1 : src = Pointer to the source binbuffer @@ -349,7 +346,7 @@ int gif_deanimate(struct binbuffer *src, struct binbuffer *dst, int get_first_im /* * Look for global colormap and copy if found. */ - if(c & 0x80) + if (c & 0x80) { int map_length = 3 * (1 << ((c & 0x07) + 1)); if (map_length <= 0) @@ -367,10 +364,7 @@ int gif_deanimate(struct binbuffer *src, struct binbuffer *dst, int get_first_im /* * Reserve a buffer for the current image block */ - if (NULL == (image = (struct binbuffer *)zalloc(sizeof(*image)))) - { - return 1; - } + image = zalloc_or_die(sizeof(*image)); /* * Parse the GIF block by block and copy the relevant