comparison src/cdrom/macosx/SDL_syscdrom.c @ 1338:604d73db6802

Removed uses of stdlib.h and string.h
author Sam Lantinga <slouken@libsdl.org>
date Tue, 07 Feb 2006 09:29:18 +0000
parents c9b51268668f
children d910939febfa
comparison
equal deleted inserted replaced
1337:c687f06c7473 1338:604d73db6802
56 /* Check if tracks are already loaded */ 56 /* Check if tracks are already loaded */
57 if ( tracks[cdrom->id] != NULL ) 57 if ( tracks[cdrom->id] != NULL )
58 return 0; 58 return 0;
59 59
60 /* Allocate memory for tracks */ 60 /* Allocate memory for tracks */
61 tracks[cdrom->id] = (FSRef*) calloc (1, sizeof(**tracks) * cdrom->numtracks); 61 tracks[cdrom->id] = (FSRef*) SDL_calloc (1, sizeof(**tracks) * cdrom->numtracks);
62 if (tracks[cdrom->id] == NULL) { 62 if (tracks[cdrom->id] == NULL) {
63 SDL_OutOfMemory (); 63 SDL_OutOfMemory ();
64 return -1; 64 return -1;
65 } 65 }
66 66
201 201
202 return 0; 202 return 0;
203 } 203 }
204 204
205 /* Allocate space for volumes */ 205 /* Allocate space for volumes */
206 volumes = (FSVolumeRefNum*) calloc (1, sizeof(*volumes) * SDL_numcds); 206 volumes = (FSVolumeRefNum*) SDL_calloc (1, sizeof(*volumes) * SDL_numcds);
207 if (volumes == NULL) { 207 if (volumes == NULL) {
208 SDL_OutOfMemory (); 208 SDL_OutOfMemory ();
209 return -1; 209 return -1;
210 } 210 }
211 211
212 /* Allocate space for tracks */ 212 /* Allocate space for tracks */
213 tracks = (FSRef**) calloc (1, sizeof(*tracks) * (SDL_numcds + 1)); 213 tracks = (FSRef**) SDL_calloc (1, sizeof(*tracks) * (SDL_numcds + 1));
214 if (tracks == NULL) { 214 if (tracks == NULL) {
215 SDL_OutOfMemory (); 215 SDL_OutOfMemory ();
216 return -1; 216 return -1;
217 } 217 }
218 218