Mercurial > sdl-ios-xcode
diff src/cdrom/win32/SDL_syscdrom.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 | 604d73db6802 |
line wrap: on
line diff
--- a/src/cdrom/win32/SDL_syscdrom.c Mon Feb 06 17:28:04 2006 +0000 +++ b/src/cdrom/win32/SDL_syscdrom.c Tue Feb 07 06:59:48 2006 +0000 @@ -66,12 +66,12 @@ if ( SDL_numcds < MAX_DRIVES ) { /* Add this drive to our list */ i = SDL_numcds; - SDL_cdlist[i] = (char *)malloc(strlen(drive)+1); + SDL_cdlist[i] = (char *)SDL_malloc(SDL_strlen(drive)+1); if ( SDL_cdlist[i] == NULL ) { SDL_OutOfMemory(); return; } - strcpy(SDL_cdlist[i], drive); + SDL_strcpy(SDL_cdlist[i], drive); ++SDL_numcds; #ifdef CDROM_DEBUG fprintf(stderr, "Added CD-ROM drive: %s\n", drive); @@ -99,12 +99,12 @@ /* Scan the system for CD-ROM drives */ for ( i='A'; i<='Z'; ++i ) { - snprintf(drive, SDL_arraysize(drive), "%c:\\", i); + SDL_snprintf(drive, SDL_arraysize(drive), "%c:\\", i); if ( GetDriveType(drive) == DRIVE_CDROM ) { AddDrive(drive); } } - memset(SDL_mciID, 0, sizeof(SDL_mciID)); + SDL_memset(SDL_mciID, 0, sizeof(SDL_mciID)); return(0); } @@ -377,7 +377,7 @@ if ( SDL_numcds > 0 ) { for ( i=0; i<SDL_numcds; ++i ) { - free(SDL_cdlist[i]); + SDL_free(SDL_cdlist[i]); } SDL_numcds = 0; }