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

version» Context lines:

pike.git/src/modules/Image/encodings/xcf.c:513:    memset(&res, 0, sizeof(res));    res.width = read_uint( buff );    res.height = read_uint( buff );       SET_ONERROR( err, free_level, &res );    offset = read_uint( buff );    while(offset)    {    struct buffer ob = *initial;    int offset2 = read_uint( buff ); -  struct tile *tile = xalloc(sizeof(struct tile)); +  struct tile *tile = ALLOC_STRUCT(tile);    read_data( &ob, offset );    if(last_tile)    last_tile->next = tile;    last_tile = tile;    if(!res.first_tile)    res.first_tile = tile;    tile->data = ob;    tile->next = NULL;    offset = offset2;    }
pike.git/src/modules/Image/encodings/xcf.c:565:    res.width = read_uint( buff );    res.height = read_uint( buff );    res.name = read_string( buff );       SET_ONERROR( err, free_layer_mask, &res );    do    {    tmp = read_property( buff );    if(tmp.type)    { -  struct property *s = xalloc(sizeof(struct property)); +  struct property *s = ALLOC_STRUCT(property);    *s = tmp;    s->next = res.first_property;    res.first_property = s;    }    } while(tmp.type);    offset = read_uint( buff );       if(offset)    {    struct buffer ob = *initial;
pike.git/src/modules/Image/encodings/xcf.c:602:    res.width = read_uint( buff );    res.height = read_uint( buff );    res.name = read_string( buff );       SET_ONERROR( err, free_channel, &res );    do    {    tmp = read_property( buff );    if(tmp.type)    { -  struct property *s = xalloc( sizeof(struct property )); +  struct property *s = ALLOC_STRUCT(property);    *s = tmp;    s->next = res.first_property;    res.first_property = s;    }    } while( tmp.type );    offset = read_uint( buff );       if(offset)    {    struct buffer ob = *initial;
pike.git/src/modules/Image/encodings/xcf.c:641:    res.height = read_uint( buff );    res.type = xcf_read_int( buff );    res.name = read_string( buff );          do    {    tmp = read_property( buff );    if(tmp.type)    { -  struct property *s=xalloc( sizeof(struct property )); +  struct property *s=ALLOC_STRUCT(property);    *s = tmp;    s->next = res.first_property;    res.first_property = s;    }    } while( tmp.type );       h_offset = xcf_read_int( buff );    lm_offset = xcf_read_int( buff );       if(lm_offset)    {    struct buffer loffset = *initial; -  struct layer_mask *m=xalloc(sizeof(struct layer_mask)); +  struct layer_mask *m=ALLOC_STRUCT(layer_mask);    res.mask = m;    read_data( &loffset, lm_offset );    memset(m, 0, sizeof( struct layer_mask ));    *m = read_layer_mask( &loffset, initial );    }       if(h_offset)    {    struct buffer loffset = *initial;    read_data( &loffset, h_offset );
pike.git/src/modules/Image/encodings/xcf.c:709:    res.height = read_uint( data );    res.type = xcf_read_int( data );       SET_ONERROR( err, free_image, &res );       do    {    tmp = read_property( data );    if(tmp.type)    { -  struct property *s=xalloc( sizeof(struct property )); +  struct property *s=ALLOC_STRUCT(property);    *s = tmp;    s->next = res.first_property;    res.first_property = s;    }    } while( tmp.type );       while( (offset = read_uint( data )) )    {    struct buffer layer_data = initial;    struct layer tmp;    read_data( &layer_data, offset );    tmp = read_layer( &layer_data, &initial );    if( tmp.width && tmp.height )    { -  struct layer *s = xalloc( sizeof(struct layer)); +  struct layer *s = ALLOC_STRUCT(layer);    *s = tmp;    s->next = res.first_layer;    res.first_layer = s;    }    }       while( (offset = read_uint( data )) )    {    struct buffer channel_data = initial;    struct channel tmp;    read_data( &channel_data, offset );    tmp = read_channel( &channel_data, &initial );    if( tmp.width && tmp.height )    { -  struct channel *s = xalloc( sizeof(struct channel)); +  struct channel *s = ALLOC_STRUCT(channel);    *s = tmp;    s->next = res.first_channel;    res.first_channel = s;    }    }    UNSET_ONERROR( err );    return res;   }      static void push_buffer( struct buffer *b )