Another patch from Mattias
authorSam Lantinga <slouken@lokigames.com>
Sun, 18 Mar 2001 18:08:19 +0000
changeset 2734870338be23
parent 26 d51719e1b5d9
child 28 dd8264c1b90d
Another patch from Mattias
IMG_gif.c
IMG_jpg.c
     1.1 --- a/IMG_gif.c	Wed Mar 07 17:16:38 2001 +0000
     1.2 +++ b/IMG_gif.c	Sun Mar 18 18:08:19 2001 +0000
     1.3 @@ -117,7 +117,7 @@
     1.4  
     1.5  #define LM_to_uint(a,b)			(((b)<<8)|(a))
     1.6  
     1.7 -struct {
     1.8 +static struct {
     1.9      unsigned int Width;
    1.10      unsigned int Height;
    1.11      unsigned char ColorMap[3][MAXCOLORMAPSIZE];
     2.1 --- a/IMG_jpg.c	Wed Mar 07 17:16:38 2001 +0000
     2.2 +++ b/IMG_jpg.c	Sun Mar 18 18:08:19 2001 +0000
     2.3 @@ -67,7 +67,7 @@
     2.4   * Initialize source --- called by jpeg_read_header
     2.5   * before any data is actually read.
     2.6   */
     2.7 -void _init_source (j_decompress_ptr cinfo)
     2.8 +static void init_source (j_decompress_ptr cinfo)
     2.9  {
    2.10  	/* We don't actually need to do anything */
    2.11  	return;
    2.12 @@ -76,7 +76,7 @@
    2.13  /*
    2.14   * Fill the input buffer --- called whenever buffer is emptied.
    2.15   */
    2.16 -int _fill_input_buffer (j_decompress_ptr cinfo)
    2.17 +static int fill_input_buffer (j_decompress_ptr cinfo)
    2.18  {
    2.19  	my_source_mgr * src = (my_source_mgr *) cinfo->src;
    2.20  	int nbytes;
    2.21 @@ -106,7 +106,7 @@
    2.22   * Arranging for additional bytes to be discarded before reloading the input
    2.23   * buffer is the application writer's problem.
    2.24   */
    2.25 -void _skip_input_data (j_decompress_ptr cinfo, long num_bytes)
    2.26 +static void skip_input_data (j_decompress_ptr cinfo, long num_bytes)
    2.27  {
    2.28  	my_source_mgr * src = (my_source_mgr *) cinfo->src;
    2.29  
    2.30 @@ -131,7 +131,7 @@
    2.31   * Terminate source --- called by jpeg_finish_decompress
    2.32   * after all data has been read.
    2.33   */
    2.34 -void _term_source (j_decompress_ptr cinfo)
    2.35 +static void term_source (j_decompress_ptr cinfo)
    2.36  {
    2.37  	/* We don't actually need to do anything */
    2.38  	return;
    2.39 @@ -142,7 +142,7 @@
    2.40   * The caller must have already opened the stream, and is responsible
    2.41   * for closing it after finishing decompression.
    2.42   */
    2.43 -void jpeg_SDL_RW_src (j_decompress_ptr cinfo, SDL_RWops *ctx)
    2.44 +static void jpeg_SDL_RW_src (j_decompress_ptr cinfo, SDL_RWops *ctx)
    2.45  {
    2.46    my_source_mgr *src;
    2.47  
    2.48 @@ -161,11 +161,11 @@
    2.49    }
    2.50  
    2.51    src = (my_source_mgr *) cinfo->src;
    2.52 -  src->pub.init_source = _init_source;
    2.53 -  src->pub.fill_input_buffer = _fill_input_buffer;
    2.54 -  src->pub.skip_input_data = _skip_input_data;
    2.55 +  src->pub.init_source = init_source;
    2.56 +  src->pub.fill_input_buffer = fill_input_buffer;
    2.57 +  src->pub.skip_input_data = skip_input_data;
    2.58    src->pub.resync_to_restart = jpeg_resync_to_restart; /* use default method */
    2.59 -  src->pub.term_source = _term_source;
    2.60 +  src->pub.term_source = term_source;
    2.61    src->ctx = ctx;
    2.62    src->pub.bytes_in_buffer = 0; /* forces fill_input_buffer on first read */
    2.63    src->pub.next_input_byte = NULL; /* until buffer loaded */