diff src/cdrom/macos/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 c9b51268668f
children 19418e4422cb
line wrap: on
line diff
--- a/src/cdrom/macos/SDL_syscdrom.c	Mon Feb 06 17:28:04 2006 +0000
+++ b/src/cdrom/macos/SDL_syscdrom.c	Tue Feb 07 06:59:48 2006 +0000
@@ -160,7 +160,7 @@
 	long				i, leadout;
 
 	/* Get the number of tracks on the CD by examining the TOC */
-	memset(&cdpb, 0, sizeof(cdpb));
+	SDL_memset(&cdpb, 0, sizeof(cdpb));
 	cdpb.ioVRefNum = SDL_cdlist[cdrom->id].driveNum;
 	cdpb.ioCRefNum = SDL_cdlist[cdrom->id].dRefNum;
 	cdpb.csCode = kReadTOC;
@@ -181,7 +181,7 @@
 
 
 	/* Get the lead out area of the CD by examining the TOC */
-	memset(&cdpb, 0, sizeof(cdpb));
+	SDL_memset(&cdpb, 0, sizeof(cdpb));
 	cdpb.ioVRefNum = SDL_cdlist[cdrom->id].driveNum;
 	cdpb.ioCRefNum = SDL_cdlist[cdrom->id].dRefNum;
 	cdpb.csCode = kReadTOC;
@@ -197,8 +197,8 @@
 			SDL_SYS_BCDToShort(cdpb.csParam.bytes[2]));
 
 	/* Get an array of track locations by examining the TOC */
-	memset(tracks, 0, sizeof(tracks));
-	memset(&cdpb, 0, sizeof(cdpb));
+	SDL_memset(tracks, 0, sizeof(tracks));
+	SDL_memset(&cdpb, 0, sizeof(cdpb));
 	cdpb.ioVRefNum = SDL_cdlist[cdrom->id].driveNum;
 	cdpb.ioCRefNum = SDL_cdlist[cdrom->id].dRefNum;
 	cdpb.csCode = kReadTOC;
@@ -255,7 +255,7 @@
 	if ( ! get_drivenum(cdrom->id) ) {
 		return(CD_TRAYEMPTY);
 	}
-	memset(&cdpb, 0, sizeof(cdpb));
+	SDL_memset(&cdpb, 0, sizeof(cdpb));
 	cdpb.ioVRefNum = SDL_cdlist[cdrom->id].driveNum;
 	cdpb.ioCRefNum = SDL_cdlist[cdrom->id].dRefNum;
 	cdpb.csCode = kReadTOC;
@@ -276,7 +276,7 @@
 
 	if (1 || SDL_cdlist[cdrom->id].hasAudio) {
 		/* Get the current playback status */
-		memset(&cdpb, 0, sizeof(cdpb));
+		SDL_memset(&cdpb, 0, sizeof(cdpb));
 		cdpb.ioVRefNum = SDL_cdlist[cdrom->id].driveNum;
 		cdpb.ioCRefNum = SDL_cdlist[cdrom->id].dRefNum;
 		cdpb.csCode = kAudioStatus;
@@ -335,7 +335,7 @@
 	}
 
 	/* Specify the AudioCD playback mode */
-	memset(&cdpb, 0, sizeof(cdpb));
+	SDL_memset(&cdpb, 0, sizeof(cdpb));
 	cdpb.ioVRefNum = SDL_cdlist[cdrom->id].driveNum;
 	cdpb.ioCRefNum = SDL_cdlist[cdrom->id].dRefNum;
 	cdpb.csCode = kSetPlayMode;
@@ -346,7 +346,7 @@
 
 #if 1
 	/* Specify the end of audio playback */
-	memset(&cdpb, 0, sizeof(cdpb));
+	SDL_memset(&cdpb, 0, sizeof(cdpb));
 	cdpb.ioVRefNum = SDL_cdlist[cdrom->id].driveNum;
 	cdpb.ioCRefNum = SDL_cdlist[cdrom->id].dRefNum;
 	cdpb.csCode = kAudioStop;
@@ -358,7 +358,7 @@
 	}
 
 	/* Specify the start of audio playback, and start it */
-	memset(&cdpb, 0, sizeof(cdpb));
+	SDL_memset(&cdpb, 0, sizeof(cdpb));
 	cdpb.ioVRefNum = SDL_cdlist[cdrom->id].driveNum;
 	cdpb.ioCRefNum = SDL_cdlist[cdrom->id].dRefNum;
 	cdpb.csCode = kAudioPlay;
@@ -373,7 +373,7 @@
 #else
 	/* Specify the end of audio playback */
 	FRAMES_TO_MSF(start+length, &m, &s, &f);
-	memset(&cdpb, 0, sizeof(cdpb));
+	SDL_memset(&cdpb, 0, sizeof(cdpb));
 	cdpb.ioVRefNum = SDL_cdlist[cdrom->id].driveNum;
 	cdpb.ioCRefNum = SDL_cdlist[cdrom->id].dRefNum;
 	cdpb.csCode = kAudioStop;
@@ -388,7 +388,7 @@
 
 	/* Specify the start of audio playback, and start it */
 	FRAMES_TO_MSF(start, &m, &s, &f);
-	memset(&cdpb, 0, sizeof(cdpb));
+	SDL_memset(&cdpb, 0, sizeof(cdpb));
 	cdpb.ioVRefNum = SDL_cdlist[cdrom->id].driveNum;
 	cdpb.ioCRefNum = SDL_cdlist[cdrom->id].dRefNum;
 	cdpb.csCode = kAudioPlay;
@@ -411,7 +411,7 @@
 {
 	CDCntrlParam cdpb;
 
-	memset(&cdpb, 0, sizeof(cdpb));
+	SDL_memset(&cdpb, 0, sizeof(cdpb));
 	cdpb.ioVRefNum = SDL_cdlist[cdrom->id].driveNum;
 	cdpb.ioCRefNum = SDL_cdlist[cdrom->id].dRefNum;
 	cdpb.csCode = kAudioPause;
@@ -429,7 +429,7 @@
 {
 	CDCntrlParam cdpb;
 
-	memset(&cdpb, 0, sizeof(cdpb));
+	SDL_memset(&cdpb, 0, sizeof(cdpb));
 	cdpb.ioVRefNum = SDL_cdlist[cdrom->id].driveNum;
 	cdpb.ioCRefNum = SDL_cdlist[cdrom->id].dRefNum;
 	cdpb.csCode = kAudioPause;
@@ -447,7 +447,7 @@
 {
 	CDCntrlParam cdpb;
 
-	memset(&cdpb, 0, sizeof(cdpb));
+	SDL_memset(&cdpb, 0, sizeof(cdpb));
 	cdpb.ioVRefNum = SDL_cdlist[cdrom->id].driveNum;
 	cdpb.ioCRefNum = SDL_cdlist[cdrom->id].dRefNum;
 	cdpb.csCode = kAudioStop;
@@ -481,7 +481,7 @@
 		}
 	
 		/* Does drive contain mounted volume? If not, skip */
-		memset(&hpb, 0, sizeof(hpb));
+		SDL_memset(&hpb, 0, sizeof(hpb));
 		hpb.volumeParam.ioVRefNum = driveElem->dQDrive;
 		if ( PBHGetVInfoSync(&hpb) != noErr ) {
 			continue;
@@ -495,7 +495,7 @@
 
 	/* If no disk is present, just eject the tray */
 	if (! disk) {
-		memset(&cpb, 0, sizeof(cpb));
+		SDL_memset(&cpb, 0, sizeof(cpb));
 		cpb.cntrlParam.ioVRefNum = 0; /* No Drive */
 		cpb.cntrlParam.ioCRefNum = SDL_cdlist[cdrom->id].dRefNum;
 		cpb.cntrlParam.csCode = kEjectTheDisc;
@@ -516,6 +516,6 @@
 void SDL_SYS_CDQuit(void)
 {
 	while(SDL_numcds--) 
-		memset(SDL_cdlist + SDL_numcds, 0, sizeof(SDL_cdlist[0]));
+		SDL_memset(SDL_cdlist + SDL_numcds, 0, sizeof(SDL_cdlist[0]));
 }