IMG_bmp.c
changeset 343 5bf0f0d6a74e
parent 332 5a8a45cd54c9
child 347 ad5034cad524
     1.1 --- a/IMG_bmp.c	Sun Jan 27 15:55:03 2013 -0800
     1.2 +++ b/IMG_bmp.c	Sun Feb 03 08:37:28 2013 -0800
     1.3 @@ -35,7 +35,7 @@
     1.4  /* See if an image is contained in a data source */
     1.5  int IMG_isBMP(SDL_RWops *src)
     1.6  {
     1.7 -	int start;
     1.8 +	Sint64 start;
     1.9  	int is_BMP;
    1.10  	char magic[2];
    1.11  
    1.12 @@ -44,7 +44,7 @@
    1.13  	start = SDL_RWtell(src);
    1.14  	is_BMP = 0;
    1.15  	if ( SDL_RWread(src, magic, sizeof(magic), 1) ) {
    1.16 -		if ( strncmp(magic, "BM", 2) == 0 ) {
    1.17 +		if ( SDL_strncmp(magic, "BM", 2) == 0 ) {
    1.18  			is_BMP = 1;
    1.19  		}
    1.20  	}
    1.21 @@ -54,7 +54,7 @@
    1.22  
    1.23  static int IMG_isICOCUR(SDL_RWops *src, int type)
    1.24  {
    1.25 -	int start;
    1.26 +	Sint64 start;
    1.27  	int is_ICOCUR;
    1.28  
    1.29  	/* The Win32 ICO file header (14 bytes) */
    1.30 @@ -187,7 +187,7 @@
    1.31  static SDL_Surface *LoadBMP_RW (SDL_RWops *src, int freesrc)
    1.32  {
    1.33  	SDL_bool was_error;
    1.34 -	long fp_offset;
    1.35 +	Sint64 fp_offset;
    1.36  	int bmpPitch;
    1.37  	int i, pad;
    1.38  	SDL_Surface *surface;
    1.39 @@ -237,7 +237,7 @@
    1.40  		was_error = SDL_TRUE;
    1.41  		goto done;
    1.42  	}
    1.43 -	if ( strncmp(magic, "BM", 2) != 0 ) {
    1.44 +	if ( SDL_strncmp(magic, "BM", 2) != 0 ) {
    1.45  		IMG_SetError("File is not a Windows BMP file");
    1.46  		was_error = SDL_TRUE;
    1.47  		goto done;
    1.48 @@ -404,7 +404,7 @@
    1.49  		goto done;
    1.50  	}
    1.51  	if ((biCompression == BI_RLE4) || (biCompression == BI_RLE8)) {
    1.52 -		was_error = readRlePixels(surface, src, biCompression == BI_RLE8);
    1.53 +		was_error = (SDL_bool)readRlePixels(surface, src, biCompression == BI_RLE8);
    1.54  		if (was_error) IMG_SetError("Error reading from BMP");
    1.55  		goto done;
    1.56  	}
    1.57 @@ -520,7 +520,7 @@
    1.58  LoadICOCUR_RW(SDL_RWops * src, int type, int freesrc)
    1.59  {
    1.60      SDL_bool was_error;
    1.61 -    long fp_offset;
    1.62 +    Sint64 fp_offset;
    1.63      int bmpPitch;
    1.64      int i, pad;
    1.65      SDL_Surface *surface;