pike.git / src / modules / Image / encodings / xcf.c

version» Context lines:

pike.git/src/modules/Image/encodings/xcf.c:1:   #include "global.h" - RCSID("$Id: xcf.c,v 1.13 2000/02/08 03:39:19 per Exp $"); + RCSID("$Id: xcf.c,v 1.14 2000/04/10 21:58:23 grubba Exp $");      #include "image_machine.h"      #include "pike_macros.h"   #include "object.h"   #include "constants.h"   #include "module_support.h"   #include "interpret.h"   #include "object.h"   #include "svalue.h"
pike.git/src/modules/Image/encodings/xcf.c:266:    struct channel *first_channel; /* OBS: In reverse order! */   };            static void free_level( struct level *l )   {    struct tile *t;    while( (t = l->first_tile) )    { -  struct tile *n; -  n = t->next; +  l->first_tile = t->next;    free(t); -  l->first_tile = n; +     }   }      static void free_layer_mask( struct layer_mask *l )   {    struct property *p;       while( (p = l->first_property) )    { -  struct property *n; -  n = p->next; +  l->first_property = p->next;    free(p); -  l->first_property = n; +     }    free_level( &l->image_data.level );   }         static void free_layer( struct layer *l )   {    struct property *p;       while( (p = l->first_property) )    { -  struct property *n; -  n = p->next; +  l->first_property = p->next;    free(p); -  l->first_property = n; +     }    if(l->mask)    {    free_layer_mask( l->mask );    free( l->mask );    }    free_level( &l->image_data.level );   }      static void free_channel( struct channel *l )   {    struct property *p;       while( (p = l->first_property) )    { -  struct property *n; -  n = p->next; +  l->first_property = p->next;    free(p); -  l->first_property = n; +     }    free_level( &l->image_data.level );   }         static void free_image( struct gimp_image *i )   {    struct property *p;    struct layer *l; -  +  struct channel *c;    while( (p = i->first_property) )    { -  struct property *n; -  n = p->next; +  i->first_property = p->next;    free(p); -  i->first_property = n; +     }    while( (l = i->first_layer) )    { -  struct layer *n; -  n = l->next; +  i->first_layer = l->next;    free_layer( l );    free( l ); -  i->first_layer = n; +     } -  +  while( (c = i->first_channel) ) +  { +  i->first_channel = c->next; +  free_channel(c); +  free(c);    } -  + }      static struct level read_level( struct buffer *buff,    struct buffer *initial )   {    struct level res;    ONERROR err;    int offset;    struct tile *last_tile = NULL;    int all_tiles_eq = 0;    MEMSET(&res, 0, sizeof(res));