IMG_xcf.c
changeset 204 dcb38b0e78a6
parent 186 5fbbeabf647f
child 236 cce1251de477
     1.1 --- a/IMG_xcf.c	Sat Sep 26 08:42:09 2009 +0000
     1.2 +++ b/IMG_xcf.c	Sat Sep 26 08:54:15 2009 +0000
     1.3 @@ -251,7 +251,7 @@
     1.4      |  ((v & 0xFF000000));
     1.5  }
     1.6  
     1.7 -void xcf_read_property (SDL_RWops * src, xcf_prop * prop) {
     1.8 +static void xcf_read_property (SDL_RWops * src, xcf_prop * prop) {
     1.9    prop->id = SDL_ReadBE32 (src);
    1.10    prop->length = SDL_ReadBE32 (src);
    1.11  
    1.12 @@ -286,14 +286,14 @@
    1.13    }
    1.14  }
    1.15  
    1.16 -void free_xcf_header (xcf_header * h) {
    1.17 +static void free_xcf_header (xcf_header * h) {
    1.18    if (h->cm_num)
    1.19      free (h->cm_map);
    1.20  
    1.21    free (h);
    1.22  }
    1.23  
    1.24 -xcf_header * read_xcf_header (SDL_RWops * src) {
    1.25 +static xcf_header * read_xcf_header (SDL_RWops * src) {
    1.26    xcf_header * h;
    1.27    xcf_prop prop;
    1.28  
    1.29 @@ -326,12 +326,12 @@
    1.30    return h;
    1.31  }
    1.32  
    1.33 -void free_xcf_layer (xcf_layer * l) {
    1.34 +static void free_xcf_layer (xcf_layer * l) {
    1.35    free (l->name);
    1.36    free (l);
    1.37  }
    1.38  
    1.39 -xcf_layer * read_xcf_layer (SDL_RWops * src) {
    1.40 +static xcf_layer * read_xcf_layer (SDL_RWops * src) {
    1.41    xcf_layer * l;
    1.42    xcf_prop    prop;
    1.43  
    1.44 @@ -358,12 +358,12 @@
    1.45    return l;
    1.46  }
    1.47  
    1.48 -void free_xcf_channel (xcf_channel * c) {
    1.49 +static void free_xcf_channel (xcf_channel * c) {
    1.50    free (c->name);
    1.51    free (c);
    1.52  }
    1.53  
    1.54 -xcf_channel * read_xcf_channel (SDL_RWops * src) {
    1.55 +static xcf_channel * read_xcf_channel (SDL_RWops * src) {
    1.56    xcf_channel * l;
    1.57    xcf_prop    prop;
    1.58  
    1.59 @@ -401,12 +401,12 @@
    1.60    return l;
    1.61  }
    1.62  
    1.63 -void free_xcf_hierarchy (xcf_hierarchy * h) {
    1.64 +static void free_xcf_hierarchy (xcf_hierarchy * h) {
    1.65    free (h->level_file_offsets);
    1.66    free (h);
    1.67  }
    1.68  
    1.69 -xcf_hierarchy * read_xcf_hierarchy (SDL_RWops * src) {
    1.70 +static xcf_hierarchy * read_xcf_hierarchy (SDL_RWops * src) {
    1.71    xcf_hierarchy * h;
    1.72    int i;
    1.73  
    1.74 @@ -425,12 +425,12 @@
    1.75    return h;
    1.76  }
    1.77  
    1.78 -void free_xcf_level (xcf_level * l) {
    1.79 +static void free_xcf_level (xcf_level * l) {
    1.80    free (l->tile_file_offsets);
    1.81    free (l);
    1.82  }
    1.83  
    1.84 -xcf_level * read_xcf_level (SDL_RWops * src) {
    1.85 +static xcf_level * read_xcf_level (SDL_RWops * src) {
    1.86    xcf_level * l;
    1.87    int i;
    1.88  
    1.89 @@ -448,11 +448,11 @@
    1.90    return l;
    1.91  }
    1.92  
    1.93 -void free_xcf_tile (unsigned char * t) {
    1.94 +static void free_xcf_tile (unsigned char * t) {
    1.95    free (t);
    1.96  }
    1.97  
    1.98 -unsigned char * load_xcf_tile_none (SDL_RWops * src, Uint32 len, int bpp, int x, int y) {
    1.99 +static unsigned char * load_xcf_tile_none (SDL_RWops * src, Uint32 len, int bpp, int x, int y) {
   1.100    unsigned char * load;
   1.101  
   1.102    load = (unsigned char *) malloc (len); // expect this is okay
   1.103 @@ -461,7 +461,7 @@
   1.104    return load;
   1.105  }
   1.106  
   1.107 -unsigned char * load_xcf_tile_rle (SDL_RWops * src, Uint32 len, int bpp, int x, int y) {
   1.108 +static unsigned char * load_xcf_tile_rle (SDL_RWops * src, Uint32 len, int bpp, int x, int y) {
   1.109    unsigned char * load, * t, * data, * d;
   1.110    Uint32 reallen;
   1.111    int i, size, count, j, length;
   1.112 @@ -528,7 +528,7 @@
   1.113    return (l << 16) | (l << 8) | l;
   1.114  }
   1.115  
   1.116 -void create_channel_surface (SDL_Surface * surf, xcf_image_type itype, Uint32 color, Uint32 opacity) {
   1.117 +static void create_channel_surface (SDL_Surface * surf, xcf_image_type itype, Uint32 color, Uint32 opacity) {
   1.118    Uint32 c = 0;
   1.119  
   1.120    switch (itype) {
   1.121 @@ -543,7 +543,7 @@
   1.122    SDL_FillRect (surf, NULL, c);
   1.123  }
   1.124  
   1.125 -int do_layer_surface (SDL_Surface * surface, SDL_RWops * src, xcf_header * head, xcf_layer * layer, load_tile_type load_tile) {
   1.126 +static int do_layer_surface (SDL_Surface * surface, SDL_RWops * src, xcf_header * head, xcf_layer * layer, load_tile_type load_tile) {
   1.127    xcf_hierarchy * hierarchy;
   1.128    xcf_level     * level;
   1.129    unsigned char * tile;