Mercurial > sdl-ios-xcode
comparison src/video/SDL_bmp.c @ 1336:3692456e7b0f
Use SDL_ prefixed versions of C library functions.
FIXME:
Change #include <stdlib.h> to #include "SDL_stdlib.h"
Change #include <string.h> to #include "SDL_string.h"
Make sure nothing else broke because of this...
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Tue, 07 Feb 2006 06:59:48 +0000 |
parents | 450721ad5436 |
children | c71e05b4dc2e |
comparison
equal
deleted
inserted
replaced
1335:c39265384763 | 1336:3692456e7b0f |
---|---|
96 if ( SDL_RWread(src, magic, 1, 2) != 2 ) { | 96 if ( SDL_RWread(src, magic, 1, 2) != 2 ) { |
97 SDL_Error(SDL_EFREAD); | 97 SDL_Error(SDL_EFREAD); |
98 was_error = 1; | 98 was_error = 1; |
99 goto done; | 99 goto done; |
100 } | 100 } |
101 if ( strncmp(magic, "BM", 2) != 0 ) { | 101 if ( SDL_strncmp(magic, "BM", 2) != 0 ) { |
102 SDL_SetError("File is not a Windows BMP file"); | 102 SDL_SetError("File is not a Windows BMP file"); |
103 was_error = 1; | 103 was_error = 1; |
104 goto done; | 104 goto done; |
105 } | 105 } |
106 bfSize = SDL_ReadLE32(src); | 106 bfSize = SDL_ReadLE32(src); |
133 biClrUsed = SDL_ReadLE32(src); | 133 biClrUsed = SDL_ReadLE32(src); |
134 biClrImportant = SDL_ReadLE32(src); | 134 biClrImportant = SDL_ReadLE32(src); |
135 } | 135 } |
136 | 136 |
137 /* Check for read error */ | 137 /* Check for read error */ |
138 if ( strcmp(SDL_GetError(), "") != 0 ) { | 138 if ( SDL_strcmp(SDL_GetError(), "") != 0 ) { |
139 was_error = 1; | 139 was_error = 1; |
140 goto done; | 140 goto done; |
141 } | 141 } |
142 | 142 |
143 /* Expand 1 and 4 bit bitmaps to 8 bits per pixel */ | 143 /* Expand 1 and 4 bit bitmaps to 8 bits per pixel */ |
517 } | 517 } |
518 | 518 |
519 if ( freedst && dst ) { | 519 if ( freedst && dst ) { |
520 SDL_RWclose(dst); | 520 SDL_RWclose(dst); |
521 } | 521 } |
522 return((strcmp(SDL_GetError(), "") == 0) ? 0 : -1); | 522 return((SDL_strcmp(SDL_GetError(), "") == 0) ? 0 : -1); |
523 } | 523 } |
524 | 524 |
525 #endif /* ENABLE_FILE */ | 525 #endif /* ENABLE_FILE */ |