Cleaning up warnings on MacOS X
authorSam Lantinga <slouken@libsdl.org>
Thu, 09 Mar 2006 06:33:21 +0000
changeset 1487dc6b59e925a2
parent 1486 9d77fc9d0ace
child 1488 29ea15e37aea
Cleaning up warnings on MacOS X
include/SDL_syswm.h
src/SDL.c
src/audio/SDL_audio.c
src/audio/SDL_mixer_MMX.h
src/audio/SDL_mixer_MMX_VC.h
src/audio/SDL_wave.c
src/audio/macosx/SDL_coreaudio.c
src/cdrom/macosx/AudioFilePlayer.c
src/cdrom/macosx/AudioFilePlayer.h
src/cdrom/macosx/AudioFileReaderThread.c
src/cdrom/macosx/CDPlayer.c
src/cdrom/macosx/CDPlayer.h
src/cdrom/macosx/SDLOSXCAGuard.c
src/cdrom/macosx/SDLOSXCAGuard.h
src/cdrom/macosx/SDL_syscdrom.c
src/cpuinfo/SDL_cpuinfo.c
src/joystick/darwin/SDL_sysjoystick.c
src/thread/pthread/SDL_syssem.c
src/video/SDL_blit_A.c
src/video/SDL_blit_N.c
src/video/quartz/SDL_QuartzEvents.m
src/video/quartz/SDL_QuartzVideo.m
src/video/quartz/SDL_QuartzWindow.m
     1.1 --- a/include/SDL_syswm.h	Wed Mar 08 18:30:12 2006 +0000
     1.2 +++ b/include/SDL_syswm.h	Thu Mar 09 06:33:21 2006 +0000
     1.3 @@ -48,7 +48,7 @@
     1.4  /* This is the structure for custom window manager events */
     1.5  #if SDL_VIDEO_DRIVER_X11
     1.6  #if defined(__APPLE__) && defined(__MACH__)
     1.7 -// conflicts with Quickdraw.h
     1.8 +/* conflicts with Quickdraw.h */
     1.9  #define Cursor X11Cursor
    1.10  #endif
    1.11  
    1.12 @@ -56,7 +56,7 @@
    1.13  #include <X11/Xatom.h>
    1.14  
    1.15  #if defined(__APPLE__) && defined(__MACH__)
    1.16 -// matches the re-define above
    1.17 +/* matches the re-define above */
    1.18  #undef Cursor
    1.19  #endif
    1.20  
     2.1 --- a/src/SDL.c	Wed Mar 08 18:30:12 2006 +0000
     2.2 +++ b/src/SDL.c	Thu Mar 09 06:33:21 2006 +0000
     2.3 @@ -253,14 +253,14 @@
     2.4  }
     2.5  
     2.6  #if defined(__OS2__)
     2.7 -// Building for OS/2
     2.8 +/* Building for OS/2 */
     2.9  #ifdef __WATCOMC__
    2.10  
    2.11  #define INCL_DOSERRORS
    2.12  #define INCL_DOSEXCEPTIONS
    2.13  #include <os2.h>
    2.14  
    2.15 -// Exception handler to prevent the Audio thread hanging, making a zombie process!
    2.16 +/* Exception handler to prevent the Audio thread hanging, making a zombie process! */
    2.17  ULONG _System SDL_Main_ExceptionHandler(PEXCEPTIONREPORTRECORD pERepRec,
    2.18                                          PEXCEPTIONREGISTRATIONRECORD pERegRec,
    2.19                                          PCONTEXTRECORD pCtxRec,
    2.20 @@ -273,7 +273,7 @@
    2.21    if (pERepRec->fHandlerFlags & EH_NESTED_CALL)
    2.22      return XCPT_CONTINUE_SEARCH;
    2.23  
    2.24 -  // Do cleanup at every fatal exception!
    2.25 +  /* Do cleanup at every fatal exception! */
    2.26    if (((pERepRec->ExceptionNum & XCPT_SEVERITY_CODE) == XCPT_FATAL_EXCEPTION) &&
    2.27        (pERepRec->ExceptionNum != XCPT_BREAKPOINT) &&
    2.28        (pERepRec->ExceptionNum != XCPT_SINGLE_STEP)
    2.29 @@ -281,7 +281,7 @@
    2.30    {
    2.31      if (SDL_initialized & SDL_INIT_AUDIO)
    2.32      {
    2.33 -      // This removes the zombie audio thread in case of emergency.
    2.34 +      /* This removes the zombie audio thread in case of emergency. */
    2.35  #ifdef DEBUG_BUILD
    2.36        printf("[SDL_Main_ExceptionHandler] : Calling SDL_CloseAudio()!\n");
    2.37  #endif
    2.38 @@ -294,28 +294,28 @@
    2.39  
    2.40  EXCEPTIONREGISTRATIONRECORD SDL_Main_xcpthand = {0, SDL_Main_ExceptionHandler};
    2.41  
    2.42 -// The main DLL entry for DLL Initialization and Uninitialization:
    2.43 +/* The main DLL entry for DLL Initialization and Uninitialization: */
    2.44  unsigned _System LibMain(unsigned hmod, unsigned termination)
    2.45  {
    2.46    if (termination)
    2.47    {
    2.48  #ifdef DEBUG_BUILD
    2.49 -//    printf("[SDL DLL Unintialization] : Removing exception handler\n");
    2.50 +/*    printf("[SDL DLL Unintialization] : Removing exception handler\n"); */
    2.51  #endif
    2.52      DosUnsetExceptionHandler(&SDL_Main_xcpthand);
    2.53      return 1;
    2.54    } else
    2.55    {
    2.56  #ifdef DEBUG_BUILD
    2.57 -    // Make stdout and stderr unbuffered!
    2.58 +    /* Make stdout and stderr unbuffered! */
    2.59      setbuf(stdout, NULL);
    2.60      setbuf(stderr, NULL);
    2.61  #endif
    2.62 -    // Fire up exception handler
    2.63 +    /* Fire up exception handler */
    2.64  #ifdef DEBUG_BUILD
    2.65 -//    printf("[SDL DLL Initialization] : Setting exception handler\n");
    2.66 +/*    printf("[SDL DLL Initialization] : Setting exception handler\n"); */
    2.67  #endif
    2.68 -    // Set exception handler
    2.69 +    /* Set exception handler */
    2.70      DosSetExceptionHandler(&SDL_Main_xcpthand);
    2.71  
    2.72      return 1;
     3.1 --- a/src/audio/SDL_audio.c	Wed Mar 08 18:30:12 2006 +0000
     3.2 +++ b/src/audio/SDL_audio.c	Thu Mar 09 06:33:21 2006 +0000
     3.3 @@ -29,7 +29,7 @@
     3.4  #include "SDL_sysaudio.h"
     3.5  
     3.6  #ifdef __OS2__
     3.7 -// We'll need the DosSetPriority() API!
     3.8 +/* We'll need the DosSetPriority() API! */
     3.9  #define INCL_DOSPROCESS
    3.10  #include <os2.h>
    3.11  #endif
    3.12 @@ -178,8 +178,8 @@
    3.13  #endif
    3.14  
    3.15  #ifdef __OS2__
    3.16 -        // Increase the priority of this thread to make sure that
    3.17 -        // the audio will be continuous all the time!
    3.18 +        /* Increase the priority of this thread to make sure that
    3.19 +           the audio will be continuous all the time! */
    3.20  #ifdef USE_DOSSETPRIORITY
    3.21          if (SDL_getenv("SDL_USE_TIMECRITICAL_AUDIO"))
    3.22          {
     4.1 --- a/src/audio/SDL_mixer_MMX.h	Wed Mar 08 18:30:12 2006 +0000
     4.2 +++ b/src/audio/SDL_mixer_MMX.h	Thu Mar 09 06:33:21 2006 +0000
     4.3 @@ -8,8 +8,7 @@
     4.4  */
     4.5  #include "SDL_config.h"
     4.6  
     4.7 -
     4.8 -#if defined(i386) && defined(__GNUC__) && defined(USE_ASMBLIT)
     4.9 +#if defined(__GNUC__) && defined(__i386__) && defined(SDL_ASSEMBLY_ROUTINES)
    4.10  void SDL_MixAudio_MMX_S16(char* ,char* ,unsigned int ,int );
    4.11  void SDL_MixAudio_MMX_S8(char* ,char* ,unsigned int ,int );
    4.12  #endif
     5.1 --- a/src/audio/SDL_mixer_MMX_VC.h	Wed Mar 08 18:30:12 2006 +0000
     5.2 +++ b/src/audio/SDL_mixer_MMX_VC.h	Thu Mar 09 06:33:21 2006 +0000
     5.3 @@ -23,14 +23,14 @@
     5.4  
     5.5  
     5.6  #if ((defined(_MSC_VER) && defined(_M_IX86)) || defined(__WATCOMC__)) && defined(SDL_ASSEMBLY_ROUTINES)
     5.7 -// headers for MMX assembler version of SDL_MixAudio
     5.8 -// Copyright 2002 Stephane Marchesin (stephane.marchesin@wanadoo.fr)
     5.9 -// Converted to Intel ASM notation by Cth
    5.10 -// This code is licensed under the LGPL (see COPYING for details)
    5.11 -// 
    5.12 -// Assumes buffer size in bytes is a multiple of 16
    5.13 -// Assumes SDL_MIX_MAXVOLUME = 128
    5.14 -
    5.15 +/* headers for MMX assembler version of SDL_MixAudio
    5.16 +   Copyright 2002 Stephane Marchesin (stephane.marchesin@wanadoo.fr)
    5.17 +   Converted to Intel ASM notation by Cth
    5.18 +   This code is licensed under the LGPL (see COPYING for details)
    5.19 +   
    5.20 +   Assumes buffer size in bytes is a multiple of 16
    5.21 +   Assumes SDL_MIX_MAXVOLUME = 128
    5.22 +*/
    5.23  void SDL_MixAudio_MMX_S16_VC(char* ,char* ,unsigned int ,int );
    5.24  void SDL_MixAudio_MMX_S8_VC(char* ,char* ,unsigned int ,int );
    5.25  #endif
     6.1 --- a/src/audio/SDL_wave.c	Wed Mar 08 18:30:12 2006 +0000
     6.2 +++ b/src/audio/SDL_wave.c	Thu Mar 09 06:33:21 2006 +0000
     6.3 @@ -433,7 +433,7 @@
     6.4  		was_error = 1;
     6.5  		goto done;
     6.6  	}
     6.7 -	headerDiff += sizeof(Uint32); // for WAVE
     6.8 +	headerDiff += sizeof(Uint32); /* for WAVE */
     6.9  
    6.10  	/* Read the audio data format chunk */
    6.11  	chunk.data = NULL;
    6.12 @@ -446,7 +446,7 @@
    6.13  			was_error = 1;
    6.14  			goto done;
    6.15  		}
    6.16 -		// 2 Uint32's for chunk header+len, plus the lenread
    6.17 +		/* 2 Uint32's for chunk header+len, plus the lenread */
    6.18  		headerDiff += lenread + 2 * sizeof(Uint32);
    6.19  	} while ( (chunk.magic == FACT) || (chunk.magic == LIST) );
    6.20  
    6.21 @@ -527,7 +527,7 @@
    6.22  		*audio_buf = chunk.data;
    6.23  		if(chunk.magic != DATA) headerDiff += lenread + 2 * sizeof(Uint32);
    6.24  	} while ( chunk.magic != DATA );
    6.25 -	headerDiff += 2 * sizeof(Uint32); // for the data chunk and len
    6.26 +	headerDiff += 2 * sizeof(Uint32); /* for the data chunk and len */
    6.27  
    6.28  	if ( MS_ADPCM_encoded ) {
    6.29  		if ( MS_ADPCM_decode(audio_buf, audio_len) < 0 ) {
    6.30 @@ -554,7 +554,7 @@
    6.31  		if ( freesrc ) {
    6.32  			SDL_RWclose(src);
    6.33  		} else {
    6.34 -			// seek to the end of the file (given by the RIFF chunk)
    6.35 +			/* seek to the end of the file (given by the RIFF chunk) */
    6.36  			SDL_RWseek(src, wavelen - chunk.length - headerDiff, RW_SEEK_CUR);
    6.37  		}
    6.38  	}
     7.1 --- a/src/audio/macosx/SDL_coreaudio.c	Wed Mar 08 18:30:12 2006 +0000
     7.2 +++ b/src/audio/macosx/SDL_coreaudio.c	Thu Mar 09 06:33:21 2006 +0000
     7.3 @@ -128,8 +128,8 @@
     7.4          len = bufferSize - bufferOffset;
     7.5          if (len > remaining)
     7.6              len = remaining;
     7.7 -        SDL_memcpy(ptr, buffer + bufferOffset, len);
     7.8 -        ptr += len;
     7.9 +        SDL_memcpy(ptr, (char *)buffer + bufferOffset, len);
    7.10 +        ptr = (char *)ptr + len;
    7.11          remaining -= len;
    7.12          bufferOffset += len;
    7.13      }
     8.1 --- a/src/cdrom/macosx/AudioFilePlayer.c	Wed Mar 08 18:30:12 2006 +0000
     8.2 +++ b/src/cdrom/macosx/AudioFilePlayer.c	Thu Mar 09 06:33:21 2006 +0000
     8.3 @@ -24,9 +24,9 @@
     8.4  */
     8.5  #include "SDL_config.h"
     8.6  
     8.7 -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     8.8 -//  AudioFilePlayer.cpp
     8.9 -//
    8.10 +/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    8.11 +    AudioFilePlayer.cpp
    8.12 +*/
    8.13  #include "AudioFilePlayer.h"
    8.14  
    8.15  /*
    8.16 @@ -61,7 +61,7 @@
    8.17  
    8.18  static int AudioFilePlayer_SetDestination (AudioFilePlayer *afp, AudioUnit  *inDestUnit)
    8.19  {
    8.20 -    //if (afp->mConnected) throw static_cast<OSStatus>(-1); //can't set dest if already engaged
    8.21 +    /*if (afp->mConnected) throw static_cast<OSStatus>(-1);*/ /* can't set dest if already engaged */
    8.22      if (afp->mConnected)
    8.23          return 0 ;
    8.24  
    8.25 @@ -70,17 +70,17 @@
    8.26      OSStatus result = noErr;
    8.27      
    8.28  
    8.29 -        //we can "down" cast a component instance to a component
    8.30 +        /* we can "down" cast a component instance to a component */
    8.31      ComponentDescription desc;
    8.32      result = GetComponentInfo ((Component)*inDestUnit, &desc, 0, 0, 0);
    8.33 -    if (result) return 0; //THROW_RESULT("GetComponentInfo")
    8.34 +    if (result) return 0; /*THROW_RESULT("GetComponentInfo")*/
    8.35          
    8.36 -        // we're going to use this to know which convert routine to call
    8.37 -        // a v1 audio unit will have a type of 'aunt'
    8.38 -        // a v2 audio unit will have one of several different types.
    8.39 +        /* we're going to use this to know which convert routine to call
    8.40 +           a v1 audio unit will have a type of 'aunt'
    8.41 +           a v2 audio unit will have one of several different types. */
    8.42      if (desc.componentType != kAudioUnitComponentType) {
    8.43          result = badComponentInstance;
    8.44 -        //THROW_RESULT("BAD COMPONENT")
    8.45 +        /*THROW_RESULT("BAD COMPONENT")*/
    8.46          if (result) return 0;
    8.47      }
    8.48  
    8.49 @@ -91,7 +91,7 @@
    8.50                                 0,
    8.51                                 &afp->mFileDescription,
    8.52                                 sizeof (afp->mFileDescription));
    8.53 -        //THROW_RESULT("AudioUnitSetProperty")
    8.54 +        /*THROW_RESULT("AudioUnitSetProperty")*/
    8.55      if (result) return 0;
    8.56      return 1;
    8.57  }
    8.58 @@ -170,7 +170,7 @@
    8.59          if (!afp->mAudioFileManager->DoConnect(afp->mAudioFileManager))
    8.60              return 0;
    8.61  
    8.62 -        // set the render callback for the file data to be supplied to the sound converter AU
    8.63 +        /* set the render callback for the file data to be supplied to the sound converter AU */
    8.64          afp->mInputCallback.inputProc = afp->mAudioFileManager->FileInputProc;
    8.65          afp->mInputCallback.inputProcRefCon = afp->mAudioFileManager;
    8.66  
    8.67 @@ -180,15 +180,15 @@
    8.68                              0,
    8.69                              &afp->mInputCallback, 
    8.70                              sizeof(afp->mInputCallback));
    8.71 -        if (result) return 0;  //THROW_RESULT("AudioUnitSetProperty")
    8.72 +        if (result) return 0;  /*THROW_RESULT("AudioUnitSetProperty")*/
    8.73          afp->mConnected = 1;
    8.74      }
    8.75  
    8.76      return 1;
    8.77  }
    8.78  
    8.79 -// warning noted, now please go away ;-)
    8.80 -// #warning This should redirect the calling of notification code to some other thread
    8.81 +/* warning noted, now please go away ;-) */
    8.82 +/* #warning This should redirect the calling of notification code to some other thread */
    8.83  static void    AudioFilePlayer_DoNotification (AudioFilePlayer *afp, OSStatus inStatus)
    8.84  {
    8.85      if (afp->mNotifier) {
    8.86 @@ -243,52 +243,53 @@
    8.87      ByteCount actual;
    8.88      SInt64 offset;
    8.89  
    8.90 -    // Open the data fork of the input file
    8.91 +    /* Open the data fork of the input file */
    8.92      result = FSGetDataForkName(&dfName);
    8.93 -       if (result) return 0; //THROW_RESULT("AudioFilePlayer::OpenFile(): FSGetDataForkName")
    8.94 +       if (result) return 0; /*THROW_RESULT("AudioFilePlayer::OpenFile(): FSGetDataForkName")*/
    8.95  
    8.96      result = FSOpenFork(inRef, dfName.length, dfName.unicode, fsRdPerm, &afp->mForkRefNum);
    8.97 -       if (result) return 0; //THROW_RESULT("AudioFilePlayer::OpenFile(): FSOpenFork")
    8.98 +       if (result) return 0; /*THROW_RESULT("AudioFilePlayer::OpenFile(): FSOpenFork")*/
    8.99   
   8.100 -    // Read the file header, and check if it's indeed an AIFC file
   8.101 +    /* Read the file header, and check if it's indeed an AIFC file */
   8.102      result = FSReadFork(afp->mForkRefNum, fsAtMark, 0, sizeof(chunkHeader), &chunkHeader, &actual);
   8.103 -       if (result) return 0; //THROW_RESULT("AudioFilePlayer::OpenFile(): FSReadFork")
   8.104 +       if (result) return 0; /*THROW_RESULT("AudioFilePlayer::OpenFile(): FSReadFork")*/
   8.105  
   8.106      if (chunkHeader.ckID != 'FORM') {
   8.107          result = -1;
   8.108 -        if (result) return 0; //THROW_RESULT("AudioFilePlayer::OpenFile(): chunk id is not 'FORM'");
   8.109 +        if (result) return 0; /*THROW_RESULT("AudioFilePlayer::OpenFile(): chunk id is not 'FORM'");*/
   8.110      }
   8.111  
   8.112      if (chunkHeader.formType != 'AIFC') {
   8.113          result = -1;
   8.114 -        if (result) return 0; //THROW_RESULT("AudioFilePlayer::OpenFile(): file format is not 'AIFC'");
   8.115 +        if (result) return 0; /*THROW_RESULT("AudioFilePlayer::OpenFile(): file format is not 'AIFC'");*/
   8.116      }
   8.117  
   8.118 -    // Search for the SSND chunk. We ignore all compression etc. information
   8.119 -    // in other chunks. Of course that is kind of evil, but for now we are lazy
   8.120 -    // and rely on the cdfs to always give us the same fixed format.
   8.121 -    // TODO: Parse the COMM chunk we currently skip to fill in mFileDescription.
   8.122 +    /* Search for the SSND chunk. We ignore all compression etc. information
   8.123 +       in other chunks. Of course that is kind of evil, but for now we are lazy
   8.124 +       and rely on the cdfs to always give us the same fixed format.
   8.125 +       TODO: Parse the COMM chunk we currently skip to fill in mFileDescription.
   8.126 +    */
   8.127      offset = 0;
   8.128      do {
   8.129          result = FSReadFork(afp->mForkRefNum, fsFromMark, offset, sizeof(chunk), &chunk, &actual);
   8.130 -           if (result) return 0; //THROW_RESULT("AudioFilePlayer::OpenFile(): FSReadFork")
   8.131 +           if (result) return 0; /*THROW_RESULT("AudioFilePlayer::OpenFile(): FSReadFork")*/
   8.132              
   8.133 -        // Skip the chunk data
   8.134 +        /* Skip the chunk data */
   8.135          offset = chunk.ckSize;
   8.136      } while (chunk.ckID != 'SSND');
   8.137  
   8.138 -    // Read the header of the SSND chunk. After this, we are positioned right
   8.139 -    // at the start of the audio data.
   8.140 +    /* Read the header of the SSND chunk. After this, we are positioned right
   8.141 +       at the start of the audio data. */
   8.142      result = FSReadFork(afp->mForkRefNum, fsAtMark, 0, sizeof(ssndData), &ssndData, &actual);
   8.143 -       if (result) return 0; //THROW_RESULT("AudioFilePlayer::OpenFile(): FSReadFork")
   8.144 +       if (result) return 0; /*THROW_RESULT("AudioFilePlayer::OpenFile(): FSReadFork")*/
   8.145  
   8.146      result = FSSetForkPosition(afp->mForkRefNum, fsFromMark, ssndData.offset);
   8.147 -       if (result) return 0; //THROW_RESULT("AudioFilePlayer::OpenFile(): FSSetForkPosition")
   8.148 +       if (result) return 0; /*THROW_RESULT("AudioFilePlayer::OpenFile(): FSSetForkPosition")*/
   8.149  
   8.150 -    // Data size
   8.151 +    /* Data size */
   8.152      *outFileDataSize = chunk.ckSize - ssndData.offset - 8;
   8.153  
   8.154 -    // File format
   8.155 +    /* File format */
   8.156      afp->mFileDescription.mSampleRate = 44100;
   8.157      afp->mFileDescription.mFormatID = kAudioFormatLinearPCM;
   8.158      afp->mFileDescription.mFormatFlags = kLinearPCMFormatFlagIsPacked | kLinearPCMFormatFlagIsSignedInteger;
   8.159 @@ -331,7 +332,7 @@
   8.160          return NULL;
   8.161      }
   8.162          
   8.163 -    // we want about 4 seconds worth of data for the buffer
   8.164 +    /* we want about 4 seconds worth of data for the buffer */
   8.165      int bytesPerSecond = (UInt32) (4 * afp->mFileDescription.mSampleRate * afp->mFileDescription.mBytesPerFrame);
   8.166      
   8.167  #if DEBUG
     9.1 --- a/src/cdrom/macosx/AudioFilePlayer.h	Wed Mar 08 18:30:12 2006 +0000
     9.2 +++ b/src/cdrom/macosx/AudioFilePlayer.h	Thu Mar 09 06:33:21 2006 +0000
     9.3 @@ -24,9 +24,9 @@
     9.4  */
     9.5  #include "SDL_config.h"
     9.6  
     9.7 -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     9.8 -//  AudioFilePlayer.h
     9.9 -//
    9.10 +/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    9.11 +    AudioFilePlayer.h
    9.12 +*/
    9.13  #ifndef __AudioFilePlayer_H__
    9.14  #define __AudioFilePlayer_H__
    9.15  
    9.16 @@ -62,12 +62,12 @@
    9.17  #pragma mark __________ AudioFilePlayer
    9.18  typedef struct S_AudioFilePlayer
    9.19  {
    9.20 -//public:
    9.21 +/*public:*/
    9.22      int             (*SetDestination)(struct S_AudioFilePlayer *afp, AudioUnit *inDestUnit);
    9.23      void            (*SetNotifier)(struct S_AudioFilePlayer *afp, AudioFilePlayNotifier inNotifier, void *inRefCon);
    9.24 -    void            (*SetStartFrame)(struct S_AudioFilePlayer *afp, int frame); // seek in the file
    9.25 -    int             (*GetCurrentFrame)(struct S_AudioFilePlayer *afp); // get the current frame position
    9.26 -    void            (*SetStopFrame)(struct S_AudioFilePlayer *afp, int frame);   // set limit in the file
    9.27 +    void            (*SetStartFrame)(struct S_AudioFilePlayer *afp, int frame); /* seek in the file */
    9.28 +    int             (*GetCurrentFrame)(struct S_AudioFilePlayer *afp); /* get the current frame position */
    9.29 +    void            (*SetStopFrame)(struct S_AudioFilePlayer *afp, int frame);   /* set limit in the file */
    9.30      int             (*Connect)(struct S_AudioFilePlayer *afp);
    9.31      void            (*Disconnect)(struct S_AudioFilePlayer *afp);
    9.32      void            (*DoNotification)(struct S_AudioFilePlayer *afp, OSStatus inError);
    9.33 @@ -75,7 +75,7 @@
    9.34      AudioUnit       (*GetDestUnit)(struct S_AudioFilePlayer *afp);
    9.35      void            (*Print)(struct S_AudioFilePlayer *afp);
    9.36  
    9.37 -//private:
    9.38 +/*private:*/
    9.39      AudioUnit                       mPlayUnit;
    9.40      SInt16                          mForkRefNum;
    9.41      
    9.42 @@ -106,19 +106,19 @@
    9.43  #pragma mark __________ AudioFileManager
    9.44  typedef struct S_AudioFileManager
    9.45  {
    9.46 -//public:
    9.47 -        // this method should NOT be called by an object of this class
    9.48 -        // as it is called by the parent's Disconnect() method
    9.49 +/*public:*/
    9.50 +        /* this method should NOT be called by an object of this class
    9.51 +           as it is called by the parent's Disconnect() method */
    9.52      void                (*Disconnect)(struct S_AudioFileManager *afm);
    9.53      int                 (*DoConnect)(struct S_AudioFileManager *afm);
    9.54      OSStatus            (*Read)(struct S_AudioFileManager *afm, char *buffer, UInt32 *len);
    9.55      const char*         (*GetFileBuffer)(struct S_AudioFileManager *afm);
    9.56      const AudioFilePlayer *(*GetParent)(struct S_AudioFileManager *afm);
    9.57 -    void                (*SetPosition)(struct S_AudioFileManager *afm, SInt64 pos);  // seek/rewind in the file
    9.58 -    int                 (*GetByteCounter)(struct S_AudioFileManager *afm);  // return actual bytes streamed to audio hardware
    9.59 -    void                (*SetEndOfFile)(struct S_AudioFileManager *afm, SInt64 pos);  // set the "EOF" (will behave just like it reached eof)
    9.60 +    void                (*SetPosition)(struct S_AudioFileManager *afm, SInt64 pos);  /* seek/rewind in the file */
    9.61 +    int                 (*GetByteCounter)(struct S_AudioFileManager *afm);  /* return actual bytes streamed to audio hardware */
    9.62 +    void                (*SetEndOfFile)(struct S_AudioFileManager *afm, SInt64 pos);  /* set the "EOF" (will behave just like it reached eof) */
    9.63     
    9.64 -//protected:
    9.65 +/*protected:*/
    9.66      AudioFilePlayer*    mParent;
    9.67      SInt16              mForkRefNum;
    9.68      SInt64              mAudioDataOffset;
    9.69 @@ -137,20 +137,20 @@
    9.70  	void*               mTmpBuffer;
    9.71  	UInt32              mBufferSize;
    9.72  	UInt32              mBufferOffset;
    9.73 -//public:
    9.74 +/*public:*/
    9.75      UInt32              mChunkSize;
    9.76      SInt64              mFileLength;
    9.77      SInt64              mReadFilePosition;
    9.78      int                 mWriteToFirstBuffer;
    9.79      int                 mFinishedReadingData;
    9.80  
    9.81 -//protected:
    9.82 +/*protected:*/
    9.83      OSStatus            (*Render)(struct S_AudioFileManager *afm, AudioBuffer *ioData);
    9.84      OSStatus            (*GetFileData)(struct S_AudioFileManager *afm, void** inOutData, UInt32 *inOutDataSize);
    9.85      void                (*AfterRender)(struct S_AudioFileManager *afm);
    9.86  
    9.87 -//public:
    9.88 -    //static
    9.89 +/*public:*/
    9.90 +    /*static*/
    9.91      OSStatus            (*FileInputProc)(void                             *inRefCon,
    9.92                                           AudioUnitRenderActionFlags      inActionFlags,
    9.93                                           const AudioTimeStamp            *inTimeStamp,
    10.1 --- a/src/cdrom/macosx/AudioFileReaderThread.c	Wed Mar 08 18:30:12 2006 +0000
    10.2 +++ b/src/cdrom/macosx/AudioFileReaderThread.c	Thu Mar 09 06:33:21 2006 +0000
    10.3 @@ -24,17 +24,17 @@
    10.4  */
    10.5  #include "SDL_config.h"
    10.6  
    10.7 -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    10.8 -// AudioFileManager.cpp
    10.9 -//
   10.10 +/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   10.11 +   AudioFileManager.cpp
   10.12 +*/
   10.13  #include "AudioFilePlayer.h"
   10.14 -#include <mach/mach.h> //used for setting policy of thread
   10.15 +#include <mach/mach.h> /* used for setting policy of thread */
   10.16  #include "SDLOSXCAGuard.h"
   10.17  #include <pthread.h>
   10.18  
   10.19 -//#include <list>
   10.20 +/*#include <list>*/
   10.21  
   10.22 -//typedef void *FileData;
   10.23 +/*typedef void *FileData;*/
   10.24  typedef struct S_FileData
   10.25  {
   10.26      AudioFileManager *obj;
   10.27 @@ -43,7 +43,7 @@
   10.28  
   10.29  
   10.30  typedef struct S_FileReaderThread {
   10.31 -//public:
   10.32 +/*public:*/
   10.33      SDLOSXCAGuard*                    (*GetGuard)(struct S_FileReaderThread *frt);
   10.34      void                        (*AddReader)(struct S_FileReaderThread *frt);
   10.35      void                        (*RemoveReader)(struct S_FileReaderThread *frt, AudioFileManager* inItem);
   10.36 @@ -51,8 +51,8 @@
   10.37  
   10.38      int     mThreadShouldDie;
   10.39      
   10.40 -//private:
   10.41 -    //typedef std::list<AudioFileManager*> FileData;
   10.42 +/*private:*/
   10.43 +    /*typedef std::list<AudioFileManager*> FileData;*/
   10.44  
   10.45      SDLOSXCAGuard             *mGuard;
   10.46      UInt32              mThreadPriority;
   10.47 @@ -63,9 +63,9 @@
   10.48  
   10.49      void                        (*ReadNextChunk)(struct S_FileReaderThread *frt);
   10.50      int                         (*StartFixedPriorityThread)(struct S_FileReaderThread *frt);
   10.51 -    //static
   10.52 +    /*static*/
   10.53      UInt32               (*GetThreadBasePriority)(pthread_t inThread);
   10.54 -    //static
   10.55 +    /*static*/
   10.56      void*                (*DiskReaderEntry)(void *inRefCon);
   10.57  } FileReaderThread;
   10.58  
   10.59 @@ -75,15 +75,15 @@
   10.60      return frt->mGuard;
   10.61  }
   10.62  
   10.63 -// returns 1 if succeeded
   10.64 +/* returns 1 if succeeded */
   10.65  static int FileReaderThread_TryNextRead (FileReaderThread *frt, AudioFileManager* inItem)
   10.66  {
   10.67      int didLock = 0;
   10.68      int succeeded = 0;
   10.69      if (frt->mGuard->Try(frt->mGuard, &didLock))
   10.70      {
   10.71 -        //frt->mFileData.push_back (inItem);
   10.72 -        // !!! FIXME: this could be faster with a "tail" member. --ryan.
   10.73 +        /*frt->mFileData.push_back (inItem);*/
   10.74 +        /* !!! FIXME: this could be faster with a "tail" member. --ryan. */
   10.75          FileData *i = frt->mFileData;
   10.76          FileData *prev = NULL;
   10.77  
   10.78 @@ -123,7 +123,7 @@
   10.79      {
   10.80          int bNeedsRelease = frt->mGuard->Lock(frt->mGuard);
   10.81          
   10.82 -        //frt->mFileData.remove (inItem);
   10.83 +        /*frt->mFileData.remove (inItem);*/
   10.84          FileData *i = frt->mFileData;
   10.85          FileData *prev = NULL;
   10.86          while (i != NULL)
   10.87 @@ -144,8 +144,8 @@
   10.88  
   10.89          if (--frt->mNumReaders == 0) {
   10.90              frt->mThreadShouldDie = 1;
   10.91 -            frt->mGuard->Notify(frt->mGuard); // wake up thread so it will quit
   10.92 -            frt->mGuard->Wait(frt->mGuard);   // wait for thread to die
   10.93 +            frt->mGuard->Notify(frt->mGuard); /* wake up thread so it will quit */
   10.94 +            frt->mGuard->Wait(frt->mGuard);   /* wait for thread to die */
   10.95          }
   10.96  
   10.97          if (bNeedsRelease) frt->mGuard->Unlock(frt->mGuard);
   10.98 @@ -158,34 +158,34 @@
   10.99      pthread_t           pThread;
  10.100  
  10.101      OSStatus result = pthread_attr_init(&theThreadAttrs);
  10.102 -        if (result) return 0; //THROW_RESULT("pthread_attr_init - Thread attributes could not be created.")
  10.103 +        if (result) return 0; /*THROW_RESULT("pthread_attr_init - Thread attributes could not be created.")*/
  10.104      
  10.105      result = pthread_attr_setdetachstate(&theThreadAttrs, PTHREAD_CREATE_DETACHED);
  10.106 -        if (result) return 0; //THROW_RESULT("pthread_attr_setdetachstate - Thread attributes could not be detached.")
  10.107 +        if (result) return 0; /*THROW_RESULT("pthread_attr_setdetachstate - Thread attributes could not be detached.")*/
  10.108      
  10.109      result = pthread_create (&pThread, &theThreadAttrs, frt->DiskReaderEntry, frt);
  10.110 -        if (result) return 0; //THROW_RESULT("pthread_create - Create and start the thread.")
  10.111 +        if (result) return 0; /*THROW_RESULT("pthread_create - Create and start the thread.")*/
  10.112      
  10.113      pthread_attr_destroy(&theThreadAttrs);
  10.114      
  10.115 -    // we've now created the thread and started it
  10.116 -    // we'll now set the priority of the thread to the nominated priority
  10.117 -    // and we'll also make the thread fixed
  10.118 +    /* we've now created the thread and started it
  10.119 +       we'll now set the priority of the thread to the nominated priority
  10.120 +       and we'll also make the thread fixed */
  10.121      thread_extended_policy_data_t       theFixedPolicy;
  10.122      thread_precedence_policy_data_t     thePrecedencePolicy;
  10.123      SInt32                              relativePriority;
  10.124      
  10.125 -    // make thread fixed
  10.126 -    theFixedPolicy.timeshare = 0;   // set to 1 for a non-fixed thread
  10.127 +    /* make thread fixed */
  10.128 +    theFixedPolicy.timeshare = 0;   /* set to 1 for a non-fixed thread */
  10.129      result = thread_policy_set (pthread_mach_thread_np(pThread), THREAD_EXTENDED_POLICY, (thread_policy_t)&theFixedPolicy, THREAD_EXTENDED_POLICY_COUNT);
  10.130 -        if (result) return 0; //THROW_RESULT("thread_policy - Couldn't set thread as fixed priority.")
  10.131 -    // set priority
  10.132 -    // precedency policy's "importance" value is relative to spawning thread's priority
  10.133 +        if (result) return 0; /*THROW_RESULT("thread_policy - Couldn't set thread as fixed priority.")*/
  10.134 +    /* set priority */
  10.135 +    /* precedency policy's "importance" value is relative to spawning thread's priority */
  10.136      relativePriority = frt->mThreadPriority - frt->GetThreadBasePriority(pthread_self());
  10.137          
  10.138      thePrecedencePolicy.importance = relativePriority;
  10.139      result = thread_policy_set (pthread_mach_thread_np(pThread), THREAD_PRECEDENCE_POLICY, (thread_policy_t)&thePrecedencePolicy, THREAD_PRECEDENCE_POLICY_COUNT);
  10.140 -        if (result) return 0; //THROW_RESULT("thread_policy - Couldn't set thread priority.")
  10.141 +        if (result) return 0; /*THROW_RESULT("thread_policy - Couldn't set thread priority.")*/
  10.142  
  10.143      return 1;
  10.144  }
  10.145 @@ -196,7 +196,7 @@
  10.146      policy_info_data_t                  thePolicyInfo;
  10.147      unsigned int                        count;
  10.148      
  10.149 -    // get basic info
  10.150 +    /* get basic info */
  10.151      count = THREAD_BASIC_INFO_COUNT;
  10.152      thread_info (pthread_mach_thread_np (inThread), THREAD_BASIC_INFO, (integer_t*)&threadInfo, &count);
  10.153      
  10.154 @@ -250,7 +250,7 @@
  10.155  
  10.156      for (;;) 
  10.157      {
  10.158 -        { // this is a scoped based lock
  10.159 +        { /* this is a scoped based lock */
  10.160              int bNeedsRelease = frt->mGuard->Lock(frt->mGuard);
  10.161              
  10.162              if (frt->mThreadShouldDie) {
  10.163 @@ -259,13 +259,13 @@
  10.164                  return;
  10.165              }
  10.166              
  10.167 -            //if (frt->mFileData.empty())
  10.168 +            /*if (frt->mFileData.empty())*/
  10.169              if (frt->mFileData == NULL)
  10.170              {
  10.171                  frt->mGuard->Wait(frt->mGuard);
  10.172              }
  10.173                          
  10.174 -            // kill thread
  10.175 +            /* kill thread */
  10.176              if (frt->mThreadShouldDie) {
  10.177              
  10.178                  frt->mGuard->Notify(frt->mGuard);
  10.179 @@ -273,8 +273,8 @@
  10.180                  return;
  10.181              }
  10.182  
  10.183 -            //theItem = frt->mFileData.front();
  10.184 -            //frt->mFileData.pop_front();
  10.185 +            /*theItem = frt->mFileData.front();*/
  10.186 +            /*frt->mFileData.pop_front();*/
  10.187              theItem = NULL;
  10.188              if (frt->mFileData != NULL)
  10.189              {
  10.190 @@ -292,16 +292,16 @@
  10.191          else
  10.192              dataChunkSize = theItem->mChunkSize;
  10.193          
  10.194 -            // this is the exit condition for the thread
  10.195 +            /* this is the exit condition for the thread */
  10.196          if (dataChunkSize <= 0) {
  10.197              theItem->mFinishedReadingData = 1;
  10.198              continue;
  10.199          }
  10.200 -            // construct pointer
  10.201 +            /* construct pointer */
  10.202          char* writePtr = (char *) (theItem->GetFileBuffer(theItem) +
  10.203                                  (theItem->mWriteToFirstBuffer ? 0 : theItem->mChunkSize));
  10.204      
  10.205 -            // read data
  10.206 +            /* read data */
  10.207          result = theItem->Read(theItem, writePtr, &dataChunkSize);
  10.208          if (result != noErr && result != eofErr) {
  10.209              AudioFilePlayer *afp = (AudioFilePlayer *) theItem->GetParent(theItem);
  10.210 @@ -313,16 +313,16 @@
  10.211          {
  10.212              writePtr += dataChunkSize;
  10.213  
  10.214 -            // can't exit yet.. we still have to pass the partial buffer back
  10.215 -            memset (writePtr, 0, (theItem->mChunkSize - dataChunkSize));
  10.216 +            /* can't exit yet.. we still have to pass the partial buffer back */
  10.217 +            SDL_memset(writePtr, 0, (theItem->mChunkSize - dataChunkSize));
  10.218          }
  10.219          
  10.220 -        theItem->mWriteToFirstBuffer = !theItem->mWriteToFirstBuffer;   // switch buffers
  10.221 +        theItem->mWriteToFirstBuffer = !theItem->mWriteToFirstBuffer;   /* switch buffers */
  10.222          
  10.223          if (result == eofErr)
  10.224              theItem->mReadFilePosition = theItem->mFileLength;
  10.225          else
  10.226 -            theItem->mReadFilePosition += dataChunkSize;        // increment count
  10.227 +            theItem->mReadFilePosition += dataChunkSize;        /* increment count */
  10.228      }
  10.229  }
  10.230  
  10.231 @@ -372,13 +372,14 @@
  10.232  {
  10.233      if (!afm->mIsEngaged)
  10.234      {
  10.235 -        //afm->mReadFilePosition = 0;
  10.236 +        OSStatus result;
  10.237 +
  10.238 +        /*afm->mReadFilePosition = 0;*/
  10.239          afm->mFinishedReadingData = 0;
  10.240  
  10.241          afm->mNumTimesAskedSinceFinished = 0;
  10.242          afm->mLockUnsuccessful = 0;
  10.243          
  10.244 -        OSStatus result;
  10.245          UInt32 dataChunkSize;
  10.246          
  10.247          if ((afm->mFileLength - afm->mReadFilePosition) < afm->mChunkSize)
  10.248 @@ -387,7 +388,7 @@
  10.249              dataChunkSize = afm->mChunkSize;
  10.250          
  10.251          result = afm->Read(afm, afm->mFileBuffer, &dataChunkSize);
  10.252 -           if (result) return 0; //THROW_RESULT("AudioFileManager::DoConnect(): Read")
  10.253 +           if (result) return 0; /*THROW_RESULT("AudioFileManager::DoConnect(): Read")*/
  10.254  
  10.255          afm->mReadFilePosition += dataChunkSize;
  10.256                  
  10.257 @@ -398,8 +399,9 @@
  10.258          
  10.259          afm->mIsEngaged = 1;
  10.260      }
  10.261 -    //else
  10.262 -    //    throw static_cast<OSStatus>(-1); //thread has already been started
  10.263 +    /*
  10.264 +    else
  10.265 +        throw static_cast<OSStatus>(-1); */ /* thread has already been started */
  10.266  
  10.267      return 1;
  10.268  }
    11.1 --- a/src/cdrom/macosx/CDPlayer.c	Wed Mar 08 18:30:12 2006 +0000
    11.2 +++ b/src/cdrom/macosx/CDPlayer.c	Thu Mar 09 06:33:21 2006 +0000
    11.3 @@ -25,16 +25,16 @@
    11.4  #include "AudioFilePlayer.h"
    11.5  #include "SDLOSXCAGuard.h"
    11.6  
    11.7 -// we're exporting these functions into C land for SDL_syscdrom.c
    11.8 -//extern "C" {
    11.9 +/* we're exporting these functions into C land for SDL_syscdrom.c */
   11.10 +/*extern "C" {*/
   11.11  
   11.12 -//ΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡ
   11.13 -//  Constants
   11.14 -//ΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡ
   11.15 +/*///////////////////////////////////////////////////////////////////////////
   11.16 +    Constants
   11.17 +  //////////////////////////////////////////////////////////////////////////*/
   11.18  
   11.19 -#define kAudioCDFilesystemID   (UInt16)(('J' << 8) | 'H') // 'JH'; this avoids compiler warning
   11.20 +#define kAudioCDFilesystemID   (UInt16)(('J' << 8) | 'H') /* 'JH'; this avoids compiler warning */
   11.21  
   11.22 -// XML PList keys
   11.23 +/* XML PList keys */
   11.24  #define kRawTOCDataString           "Format 0x02 TOC Data"
   11.25  #define kSessionsString             "Sessions"
   11.26  #define kSessionTypeString          "Session Type"
   11.27 @@ -47,9 +47,9 @@
   11.28  #define kSessionNumberKeyString         "Session Number"
   11.29  #define kStartBlockKeyString            "Start Block"   
   11.30      
   11.31 -//ΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡ
   11.32 -//  Globals
   11.33 -//ΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡ
   11.34 +/*///////////////////////////////////////////////////////////////////////////
   11.35 +    Globals
   11.36 +  //////////////////////////////////////////////////////////////////////////*/
   11.37  
   11.38  #pragma mark -- Globals --
   11.39  
   11.40 @@ -61,9 +61,9 @@
   11.41  static SDL_sem         *callbackSem;
   11.42  static SDL_CD*          theCDROM;
   11.43  
   11.44 -//ΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡ
   11.45 -//  Prototypes
   11.46 -//ΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡ
   11.47 +/*///////////////////////////////////////////////////////////////////////////
   11.48 +    Prototypes
   11.49 +  //////////////////////////////////////////////////////////////////////////*/
   11.50  
   11.51  #pragma mark -- Prototypes --
   11.52  
   11.53 @@ -89,10 +89,6 @@
   11.54      SDL_mutexV(apiMutex);
   11.55  }
   11.56  
   11.57 -//ΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡ
   11.58 -//  DetectAudioCDVolumes
   11.59 -//ΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡ
   11.60 -
   11.61  int DetectAudioCDVolumes(FSVolumeRefNum *volumes, int numVolumes)
   11.62  {
   11.63      int volumeIndex;
   11.64 @@ -116,7 +112,7 @@
   11.65           
   11.66          if (result == noErr)
   11.67          {
   11.68 -            if (volumeInfo.filesystemID == kAudioCDFilesystemID) // It's an audio CD
   11.69 +            if (volumeInfo.filesystemID == kAudioCDFilesystemID) /* It's an audio CD */
   11.70              {
   11.71                  if (volumes != NULL && cdVolumeCount < numVolumes)
   11.72                      volumes[cdVolumeCount] = actualVolume;
   11.73 @@ -126,18 +122,14 @@
   11.74          }
   11.75          else 
   11.76          {
   11.77 -            // I'm commenting this out because it seems to be harmless
   11.78 -            //SDL_SetError ("DetectAudioCDVolumes: FSGetVolumeInfo returned %d", result);
   11.79 +            /* I'm commenting this out because it seems to be harmless */
   11.80 +            /*SDL_SetError ("DetectAudioCDVolumes: FSGetVolumeInfo returned %d", result);*/
   11.81          }
   11.82      }
   11.83          
   11.84      return cdVolumeCount;
   11.85  }
   11.86  
   11.87 -//ΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡ
   11.88 -//  ReadTOCData
   11.89 -//ΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡ
   11.90 -
   11.91  int ReadTOCData (FSVolumeRefNum theVolume, SDL_CD *theCD)
   11.92  {
   11.93      HFSUniStr255      dataForkName;
   11.94 @@ -154,7 +146,7 @@
   11.95      
   11.96      const char* error = "Unspecified Error";
   11.97      
   11.98 -    // get stuff from .TOC.plist                                                   
   11.99 +    /* get stuff from .TOC.plist */
  11.100      fsRefPB.ioCompletion = NULL;
  11.101      fsRefPB.ioNamePtr = "\p.TOC.plist";
  11.102      fsRefPB.ioVRefNum = theVolume;
  11.103 @@ -167,7 +159,7 @@
  11.104          goto bail;
  11.105      }
  11.106      
  11.107 -    // Load and parse the TOC XML data
  11.108 +    /* Load and parse the TOC XML data */
  11.109  
  11.110      theErr = FSGetDataForkName (&dataForkName);
  11.111      if (theErr != noErr) {
  11.112 @@ -187,7 +179,7 @@
  11.113          goto bail;
  11.114      }
  11.115      
  11.116 -    // Allocate some memory for the XML data
  11.117 +    /* Allocate some memory for the XML data */
  11.118      forkData = NewPtr (forkSize);
  11.119      if(forkData == NULL) {
  11.120          error = "NewPtr";
  11.121 @@ -215,9 +207,9 @@
  11.122          goto bail;
  11.123      }
  11.124  
  11.125 -    // Now we got the Property List in memory. Parse it.
  11.126 +    /* Now we got the Property List in memory. Parse it. */
  11.127      
  11.128 -    // First, make sure the root item is a CFDictionary. If not, release and bail.
  11.129 +    /* First, make sure the root item is a CFDictionary. If not, release and bail. */
  11.130      if(CFGetTypeID(propertyListRef)== CFDictionaryGetTypeID())
  11.131      {
  11.132          CFDictionaryRef dictRef = (CFDictionaryRef)propertyListRef;
  11.133 @@ -227,19 +219,19 @@
  11.134          CFIndex     numSessions;
  11.135          CFIndex     index;
  11.136          
  11.137 -        // This is how we get the Raw TOC Data
  11.138 +        /* This is how we get the Raw TOC Data */
  11.139          theRawTOCDataRef = (CFDataRef)CFDictionaryGetValue (dictRef, CFSTR(kRawTOCDataString));
  11.140          
  11.141 -        // Get the session array info.
  11.142 +        /* Get the session array info. */
  11.143          theSessionArrayRef = (CFArrayRef)CFDictionaryGetValue (dictRef, CFSTR(kSessionsString));
  11.144          
  11.145 -        // Find out how many sessions there are.
  11.146 +        /* Find out how many sessions there are. */
  11.147          numSessions = CFArrayGetCount (theSessionArrayRef);
  11.148          
  11.149 -        // Initialize the total number of tracks to 0
  11.150 +        /* Initialize the total number of tracks to 0 */
  11.151          theCD->numtracks = 0;
  11.152          
  11.153 -        // Iterate over all sessions, collecting the track data
  11.154 +        /* Iterate over all sessions, collecting the track data */
  11.155          for(index = 0; index < numSessions; index++)
  11.156          {
  11.157              CFDictionaryRef theSessionDict;
  11.158 @@ -272,7 +264,7 @@
  11.159                  startBlock    = (CFNumberRef)  CFDictionaryGetValue (theTrackDict, CFSTR(kStartBlockKeyString));
  11.160                  isDataTrack   = (CFBooleanRef) CFDictionaryGetValue (theTrackDict, CFSTR(kDataKeyString));
  11.161                                                          
  11.162 -                // Fill in the SDL_CD struct
  11.163 +                /* Fill in the SDL_CD struct */
  11.164                  int idx = theCD->numtracks++;
  11.165  
  11.166                  CFNumberGetValue (trackNumber, kCFNumberSInt32Type, &value);
  11.167 @@ -283,19 +275,19 @@
  11.168  
  11.169                  theCD->track[idx].type = (isDataTrack == kCFBooleanTrue) ? SDL_DATA_TRACK : SDL_AUDIO_TRACK;
  11.170  
  11.171 -                // Since the track lengths are not stored in .TOC.plist we compute them.
  11.172 +                /* Since the track lengths are not stored in .TOC.plist we compute them. */
  11.173                  if (trackIndex > 0) {
  11.174                      theCD->track[idx-1].length = theCD->track[idx].offset - theCD->track[idx-1].offset;
  11.175                  }
  11.176              }
  11.177              
  11.178 -            // Compute the length of the last track
  11.179 +            /* Compute the length of the last track */
  11.180              CFNumberGetValue (leadoutBlock, kCFNumberSInt32Type, &value);
  11.181              
  11.182              theCD->track[theCD->numtracks-1].length = 
  11.183                  value - theCD->track[theCD->numtracks-1].offset;
  11.184  
  11.185 -            // Set offset to leadout track
  11.186 +            /* Set offset to leadout track */
  11.187              theCD->track[theCD->numtracks].offset = value;
  11.188          }
  11.189      
  11.190 @@ -320,10 +312,6 @@
  11.191      return theErr;
  11.192  }
  11.193  
  11.194 -//ΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡ
  11.195 -//  ListTrackFiles
  11.196 -//ΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡ
  11.197 -
  11.198  int ListTrackFiles (FSVolumeRefNum theVolume, FSRef *trackFiles, int numTracks)
  11.199  {
  11.200      OSStatus        result = -1;
  11.201 @@ -357,11 +345,11 @@
  11.202                  CFStringRef  name;
  11.203                  name = CFStringCreateWithCharacters (NULL, nameStr.unicode, nameStr.length);
  11.204                  
  11.205 -                // Look for .aiff extension
  11.206 +                /* Look for .aiff extension */
  11.207                  if (CFStringHasSuffix (name, CFSTR(".aiff")) ||
  11.208                      CFStringHasSuffix (name, CFSTR(".cdda"))) {
  11.209                      
  11.210 -                    // Extract the track id from the filename
  11.211 +                    /* Extract the track id from the filename */
  11.212                      int trackID = 0, i = 0;
  11.213                      while (i < nameStr.length && !isdigit(nameStr.unicode[i])) {
  11.214                          ++i;
  11.215 @@ -376,7 +364,7 @@
  11.216                      CFStringGetCStringPtr (name, CFStringGetSystemEncoding()));
  11.217                      #endif
  11.218                      
  11.219 -                    // Track ID's start at 1, but we want to start at 0
  11.220 +                    /* Track ID's start at 1, but we want to start at 0 */
  11.221                      trackID--;
  11.222                      
  11.223                      assert(0 <= trackID && trackID <= SDL_MAX_TRACKS);
  11.224 @@ -393,10 +381,6 @@
  11.225      return 0;
  11.226  }
  11.227  
  11.228 -//ΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡ
  11.229 -//  LoadFile
  11.230 -//ΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡ
  11.231 -
  11.232  int LoadFile (const FSRef *ref, int startFrame, int stopFrame)
  11.233  {
  11.234      int error = -1;
  11.235 @@ -404,7 +388,7 @@
  11.236      if (CheckInit () < 0)
  11.237          goto bail;
  11.238      
  11.239 -    // release any currently playing file
  11.240 +    /* release any currently playing file */
  11.241      if (ReleaseFile () < 0)
  11.242          goto bail;
  11.243      
  11.244 @@ -412,14 +396,14 @@
  11.245      printf ("LoadFile: %d %d\n", startFrame, stopFrame);
  11.246      #endif
  11.247      
  11.248 -    //try {
  11.249 +    /*try {*/
  11.250      
  11.251 -        // create a new player, and attach to the audio unit
  11.252 +        /* create a new player, and attach to the audio unit */
  11.253          
  11.254          thePlayer = new_AudioFilePlayer(ref);
  11.255          if (thePlayer == NULL) {
  11.256              SDL_SetError ("LoadFile: Could not create player");
  11.257 -            return -3; //throw (-3);
  11.258 +            return -3; /*throw (-3);*/
  11.259          }
  11.260              
  11.261          if (!thePlayer->SetDestination(thePlayer, &theUnit))
  11.262 @@ -431,8 +415,8 @@
  11.263          if (stopFrame >= 0 && stopFrame > startFrame)
  11.264              thePlayer->SetStopFrame (thePlayer, stopFrame);
  11.265          
  11.266 -        // we set the notifier later
  11.267 -        //thePlayer->SetNotifier(thePlayer, FilePlayNotificationHandler, NULL);
  11.268 +        /* we set the notifier later */
  11.269 +        /*thePlayer->SetNotifier(thePlayer, FilePlayNotificationHandler, NULL);*/
  11.270              
  11.271          if (!thePlayer->Connect(thePlayer))
  11.272              goto bail;
  11.273 @@ -441,11 +425,11 @@
  11.274          thePlayer->Print(thePlayer);
  11.275          fflush (stdout);
  11.276          #endif
  11.277 -    //}
  11.278 -    //catch (...)
  11.279 -    //{
  11.280 -    //    goto bail;
  11.281 -    //}
  11.282 +    /*}
  11.283 +      catch (...)
  11.284 +      {
  11.285 +          goto bail;
  11.286 +      }*/
  11.287          
  11.288      error = 0;
  11.289  
  11.290 @@ -453,16 +437,12 @@
  11.291      return error;
  11.292  }
  11.293  
  11.294 -//ΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡ
  11.295 -//  ReleaseFile
  11.296 -//ΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡ
  11.297 -
  11.298  int ReleaseFile ()
  11.299  {
  11.300      int error = -1;
  11.301          
  11.302 -    // (Don't see any way that the original C++ code could throw here.) --ryan.
  11.303 -    //try {
  11.304 +    /* (Don't see any way that the original C++ code could throw here.) --ryan. */
  11.305 +    /*try {*/
  11.306          if (thePlayer != NULL) {
  11.307              
  11.308              thePlayer->Disconnect(thePlayer);
  11.309 @@ -471,22 +451,18 @@
  11.310              
  11.311              thePlayer = NULL;
  11.312          }
  11.313 -    //}
  11.314 -    //catch (...)
  11.315 -    //{
  11.316 -    //    goto bail;
  11.317 -    //}
  11.318 +    /*}
  11.319 +      catch (...)
  11.320 +      {
  11.321 +          goto bail;
  11.322 +      }*/
  11.323      
  11.324      error = 0;
  11.325      
  11.326 -//  bail:
  11.327 +/*  bail: */
  11.328      return error;
  11.329  }
  11.330  
  11.331 -//ΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡ
  11.332 -//  PlayFile
  11.333 -//ΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡ
  11.334 -
  11.335  int PlayFile ()
  11.336  {
  11.337      OSStatus result = -1;
  11.338 @@ -494,17 +470,17 @@
  11.339      if (CheckInit () < 0)
  11.340          goto bail;
  11.341          
  11.342 -//    try {
  11.343 +    /*try {*/
  11.344      
  11.345          // start processing of the audio unit
  11.346          result = AudioOutputUnitStart (theUnit);
  11.347              if (result) goto bail; //THROW_RESULT("PlayFile: AudioOutputUnitStart")
  11.348          
  11.349 -//    }
  11.350 -//    catch (...)
  11.351 -//    {
  11.352 -//        goto bail;
  11.353 -//    }
  11.354 +    /*}
  11.355 +    catch (...)
  11.356 +    {
  11.357 +        goto bail;
  11.358 +    }*/
  11.359      
  11.360      result = 0;
  11.361      
  11.362 @@ -512,10 +488,6 @@
  11.363      return result;
  11.364  }
  11.365  
  11.366 -//ΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡ
  11.367 -//  PauseFile
  11.368 -//ΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡ
  11.369 -
  11.370  int PauseFile ()
  11.371  {
  11.372      OSStatus result = -1;
  11.373 @@ -523,26 +495,22 @@
  11.374      if (CheckInit () < 0)
  11.375          goto bail;
  11.376              
  11.377 -    //try {
  11.378 +    /*try {*/
  11.379      
  11.380 -        // stop processing the audio unit
  11.381 +        /* stop processing the audio unit */
  11.382          result = AudioOutputUnitStop (theUnit);
  11.383 -            if (result) goto bail;  //THROW_RESULT("PauseFile: AudioOutputUnitStop")
  11.384 -    //}
  11.385 -    //catch (...)
  11.386 -    //{
  11.387 -    //    goto bail;
  11.388 -    //}
  11.389 +            if (result) goto bail;  /*THROW_RESULT("PauseFile: AudioOutputUnitStop")*/
  11.390 +    /*}
  11.391 +      catch (...)
  11.392 +      {
  11.393 +          goto bail;
  11.394 +      }*/
  11.395      
  11.396      result = 0;
  11.397  bail:
  11.398      return result;
  11.399  }
  11.400  
  11.401 -//ΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡ
  11.402 -//  SetCompletionProc
  11.403 -//ΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡ
  11.404 -
  11.405  void SetCompletionProc (CDPlayerCompletionProc proc, SDL_CD *cdrom)
  11.406  {
  11.407      assert(thePlayer != NULL);
  11.408 @@ -552,10 +520,6 @@
  11.409      thePlayer->SetNotifier (thePlayer, FilePlayNotificationHandler, cdrom);
  11.410  }
  11.411  
  11.412 -//ΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡ
  11.413 -//  GetCurrentFrame
  11.414 -//ΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡ
  11.415 -
  11.416  int GetCurrentFrame ()
  11.417  {    
  11.418      int frame;
  11.419 @@ -578,13 +542,13 @@
  11.420      
  11.421      OSStatus result = noErr;
  11.422      
  11.423 -    // Create the callback semaphore
  11.424 +    /* Create the callback semaphore */
  11.425      callbackSem = SDL_CreateSemaphore(0);
  11.426  
  11.427 -    // Start callback thread
  11.428 +    /* Start callback thread */
  11.429      SDL_CreateThread(RunCallBackThread, NULL);
  11.430  
  11.431 -    { //try {
  11.432 +    { /*try {*/
  11.433          ComponentDescription desc;
  11.434      
  11.435          desc.componentType = kAudioUnitComponentType;
  11.436 @@ -609,10 +573,10 @@
  11.437                      
  11.438          playBackWasInit = true;
  11.439      }
  11.440 -    //catch (...)
  11.441 -    //{
  11.442 -    //    return -1;
  11.443 -    //}
  11.444 +    /*catch (...)
  11.445 +      {
  11.446 +          return -1;
  11.447 +      }*/
  11.448      
  11.449      return 0;
  11.450  }
  11.451 @@ -621,7 +585,7 @@
  11.452  {
  11.453      if (inStatus == kAudioFilePlay_FileIsFinished) {
  11.454      
  11.455 -        // notify non-CA thread to perform the callback
  11.456 +        /* notify non-CA thread to perform the callback */
  11.457          SDL_SemPost(callbackSem);
  11.458          
  11.459      } else if (inStatus == kAudioFilePlayErr_FilePlayUnderrun) {
  11.460 @@ -661,4 +625,4 @@
  11.461      return 0;
  11.462  }
  11.463  
  11.464 -//}; // extern "C"
  11.465 +/*}; // extern "C" */
    12.1 --- a/src/cdrom/macosx/CDPlayer.h	Wed Mar 08 18:30:12 2006 +0000
    12.2 +++ b/src/cdrom/macosx/CDPlayer.h	Thu Mar 09 06:33:21 2006 +0000
    12.3 @@ -44,7 +44,7 @@
    12.4  
    12.5  void     Unlock();
    12.6  
    12.7 -int      LoadFile (const FSRef *ref, int startFrame, int endFrame); // pass -1 to do nothing
    12.8 +int      LoadFile (const FSRef *ref, int startFrame, int endFrame); /* pass -1 to do nothing */
    12.9  
   12.10  int      ReleaseFile ();
   12.11  
    13.1 --- a/src/cdrom/macosx/SDLOSXCAGuard.c	Wed Mar 08 18:30:12 2006 +0000
    13.2 +++ b/src/cdrom/macosx/SDLOSXCAGuard.c	Thu Mar 09 06:33:21 2006 +0000
    13.3 @@ -66,9 +66,9 @@
    13.4  
    13.5  =============================================================================*/
    13.6  
    13.7 -//=============================================================================
    13.8 -//  Includes
    13.9 -//=============================================================================
   13.10 +/*=============================================================================
   13.11 +    Includes
   13.12 +  =============================================================================*/
   13.13  
   13.14  /*
   13.15  #include <stdio.h>
   13.16 @@ -77,7 +77,7 @@
   13.17  */
   13.18  #include "SDL_stdinc.h"
   13.19  
   13.20 -//#define NDEBUG 1
   13.21 +/*#define NDEBUG 1*/
   13.22  /*
   13.23  #include <assert.h>
   13.24  */
   13.25 @@ -86,10 +86,10 @@
   13.26  
   13.27  #include "SDLOSXCAGuard.h"
   13.28  
   13.29 -//#warning      Need a try-based Locker too
   13.30 -//=============================================================================
   13.31 -//  SDLOSXCAGuard
   13.32 -//=============================================================================
   13.33 +/*#warning      Need a try-based Locker too*/
   13.34 +/*=============================================================================
   13.35 +    SDLOSXCAGuard
   13.36 +  =============================================================================*/
   13.37  
   13.38  static int SDLOSXCAGuard_Lock(SDLOSXCAGuard *cag)
   13.39  {
   13.40 @@ -98,6 +98,7 @@
   13.41      if(pthread_self() != cag->mOwner)
   13.42      {
   13.43          OSStatus theError = pthread_mutex_lock(&cag->mMutex);
   13.44 +        (void)theError;
   13.45          assert(theError == 0);
   13.46          cag->mOwner = pthread_self();
   13.47          theAnswer = 1;
   13.48 @@ -108,10 +109,12 @@
   13.49  
   13.50  static void    SDLOSXCAGuard_Unlock(SDLOSXCAGuard *cag)
   13.51  {
   13.52 +    OSStatus theError;
   13.53      assert(pthread_self() == cag->mOwner);
   13.54  
   13.55      cag->mOwner = 0;
   13.56 -    OSStatus theError = pthread_mutex_unlock(&cag->mMutex);
   13.57 +    theError = pthread_mutex_unlock(&cag->mMutex);
   13.58 +    (void)theError;
   13.59      assert(theError == 0);
   13.60  }
   13.61  
   13.62 @@ -137,11 +140,13 @@
   13.63  
   13.64  static void    SDLOSXCAGuard_Wait(SDLOSXCAGuard *cag)
   13.65  {
   13.66 +    OSStatus theError;
   13.67      assert(pthread_self() == cag->mOwner);
   13.68  
   13.69      cag->mOwner = 0;
   13.70  
   13.71 -    OSStatus theError = pthread_cond_wait(&cag->mCondVar, &cag->mMutex);
   13.72 +    theError = pthread_cond_wait(&cag->mCondVar, &cag->mMutex);
   13.73 +    (void)theError;
   13.74      assert(theError == 0);
   13.75      cag->mOwner = pthread_self();
   13.76  }
   13.77 @@ -149,12 +154,14 @@
   13.78  static void    SDLOSXCAGuard_Notify(SDLOSXCAGuard *cag)
   13.79  {
   13.80      OSStatus theError = pthread_cond_signal(&cag->mCondVar);
   13.81 +    (void)theError;
   13.82      assert(theError == 0);
   13.83  }
   13.84  
   13.85  
   13.86  SDLOSXCAGuard *new_SDLOSXCAGuard(void)
   13.87  {
   13.88 +    OSStatus theError;
   13.89      SDLOSXCAGuard *cag = (SDLOSXCAGuard *) SDL_malloc(sizeof (SDLOSXCAGuard));
   13.90      if (cag == NULL)
   13.91          return NULL;
   13.92 @@ -168,10 +175,12 @@
   13.93      SET_SDLOSXCAGUARD_METHOD(Notify);
   13.94      #undef SET_SDLOSXCAGUARD_METHOD
   13.95  
   13.96 -    OSStatus theError = pthread_mutex_init(&cag->mMutex, NULL);
   13.97 +    theError = pthread_mutex_init(&cag->mMutex, NULL);
   13.98 +    (void)theError;
   13.99      assert(theError == 0);
  13.100      
  13.101      theError = pthread_cond_init(&cag->mCondVar, NULL);
  13.102 +    (void)theError;
  13.103      assert(theError == 0);
  13.104      
  13.105      cag->mOwner = 0;
    14.1 --- a/src/cdrom/macosx/SDLOSXCAGuard.h	Wed Mar 08 18:30:12 2006 +0000
    14.2 +++ b/src/cdrom/macosx/SDLOSXCAGuard.h	Thu Mar 09 06:33:21 2006 +0000
    14.3 @@ -69,41 +69,41 @@
    14.4  #if !defined(__CAGuard_h__)
    14.5  #define __CAGuard_h__
    14.6  
    14.7 -//=============================================================================
    14.8 -//  Includes
    14.9 -//=============================================================================
   14.10 +/*=============================================================================
   14.11 +    Includes
   14.12 +  =============================================================================*/
   14.13  
   14.14  #include <CoreAudio/CoreAudioTypes.h>
   14.15  #include <pthread.h>
   14.16  
   14.17  
   14.18 -//=============================================================================
   14.19 -//  CAGuard
   14.20 -//
   14.21 -//  This is your typical mutex with signalling implemented via pthreads.
   14.22 -//  Lock() will return true if and only if the guard is locked on that call.
   14.23 -//  A thread that already has the guard will receive 'false' if it locks it
   14.24 -//  again. Use of the stack-based CAGuard::Locker class is highly recommended
   14.25 -//  to properly manage the recursive nesting. The Wait calls with timeouts
   14.26 -//  will return true if and only if the timeout period expired. They will
   14.27 -//  return false if they receive notification any other way.
   14.28 -//=============================================================================
   14.29 +/*=============================================================================
   14.30 +    CAGuard
   14.31 +  
   14.32 +    This is your typical mutex with signalling implemented via pthreads.
   14.33 +    Lock() will return true if and only if the guard is locked on that call.
   14.34 +    A thread that already has the guard will receive 'false' if it locks it
   14.35 +    again. Use of the stack-based CAGuard::Locker class is highly recommended
   14.36 +    to properly manage the recursive nesting. The Wait calls with timeouts
   14.37 +    will return true if and only if the timeout period expired. They will
   14.38 +    return false if they receive notification any other way.
   14.39 +  =============================================================================*/
   14.40  
   14.41  typedef struct S_SDLOSXCAGuard
   14.42  {
   14.43  
   14.44 -//  Construction/Destruction
   14.45 -//public:
   14.46 -//  Actions
   14.47 -//public:
   14.48 +/*  Construction/Destruction */
   14.49 +/*public:*/
   14.50 +/*  Actions */
   14.51 +/*public:*/
   14.52      int     (*Lock)(struct S_SDLOSXCAGuard *cag);
   14.53      void    (*Unlock)(struct S_SDLOSXCAGuard *cag);
   14.54 -    int     (*Try)(struct S_SDLOSXCAGuard *cag, int *outWasLocked);    // returns true if lock is free, false if not
   14.55 +    int     (*Try)(struct S_SDLOSXCAGuard *cag, int *outWasLocked);    /* returns true if lock is free, false if not */
   14.56      void    (*Wait)(struct S_SDLOSXCAGuard *cag);
   14.57      void    (*Notify)(struct S_SDLOSXCAGuard *cag);
   14.58  
   14.59 -//  Implementation
   14.60 -//protected:
   14.61 +/*  Implementation */
   14.62 +/*protected:*/
   14.63      pthread_mutex_t mMutex;
   14.64      pthread_cond_t  mCondVar;
   14.65      pthread_t       mOwner;
    15.1 --- a/src/cdrom/macosx/SDL_syscdrom.c	Wed Mar 08 18:30:12 2006 +0000
    15.2 +++ b/src/cdrom/macosx/SDL_syscdrom.c	Thu Mar 09 06:33:21 2006 +0000
    15.3 @@ -472,7 +472,7 @@
    15.4      
    15.5      status = CD_STOPPED;
    15.6      
    15.7 -	// Eject the volume
    15.8 +	/* Eject the volume */
    15.9  	pb.ioParam.ioNamePtr = NULL;
   15.10  	pb.ioParam.ioVRefNum = volumes[cdrom->id];
   15.11  	err = PBUnmountVol((ParamBlockRec *) &pb);
    16.1 --- a/src/cpuinfo/SDL_cpuinfo.c	Wed Mar 08 18:30:12 2006 +0000
    16.2 +++ b/src/cpuinfo/SDL_cpuinfo.c	Thu Mar 09 06:33:21 2006 +0000
    16.3 @@ -26,15 +26,13 @@
    16.4  #include "SDL.h"
    16.5  #include "SDL_cpuinfo.h"
    16.6  
    16.7 -#if SDL_ALTIVEC_BLITTERS && HAVE_SETJMP
    16.8 +#ifdef __MACOSX__
    16.9 +#include <sys/sysctl.h> /* For AltiVec check */
   16.10 +#elif SDL_ALTIVEC_BLITTERS && HAVE_SETJMP
   16.11  #include <signal.h>
   16.12  #include <setjmp.h>
   16.13  #endif
   16.14  
   16.15 -#ifdef __MACOSX__
   16.16 -#include <sys/sysctl.h> /* For AltiVec check */
   16.17 -#endif
   16.18 -
   16.19  #define CPU_HAS_RDTSC	0x00000001
   16.20  #define CPU_HAS_MMX	0x00000002
   16.21  #define CPU_HAS_MMXEXT	0x00000004
   16.22 @@ -44,7 +42,7 @@
   16.23  #define CPU_HAS_SSE2	0x00000080
   16.24  #define CPU_HAS_ALTIVEC	0x00000100
   16.25  
   16.26 -#if SDL_ALTIVEC_BLITTERS && HAVE_SETJMP
   16.27 +#if SDL_ALTIVEC_BLITTERS && HAVE_SETJMP && !__MACOSX__
   16.28  /* This is the brute force way of detecting instruction sets...
   16.29     the idea is borrowed from the libmpeg2 library - thanks!
   16.30   */
    17.1 --- a/src/joystick/darwin/SDL_sysjoystick.c	Wed Mar 08 18:30:12 2006 +0000
    17.2 +++ b/src/joystick/darwin/SDL_sysjoystick.c	Thu Mar 09 06:33:21 2006 +0000
    17.3 @@ -48,42 +48,42 @@
    17.4  
    17.5  struct recElement
    17.6  {
    17.7 -	IOHIDElementCookie cookie;				// unique value which identifies element, will NOT change
    17.8 -	long min;								// reported min value possible
    17.9 -	long max;								// reported max value possible
   17.10 -/*
   17.11 -	TODO: maybe should handle the following stuff somehow?
   17.12 +	IOHIDElementCookie cookie;				/* unique value which identifies element, will NOT change */
   17.13 +	long min;								/* reported min value possible */
   17.14 +	long max;								/* reported max value possible */
   17.15 +#if 0
   17.16 +	/* TODO: maybe should handle the following stuff somehow? */
   17.17  
   17.18 -	long scaledMin;							// reported scaled min value possible
   17.19 -	long scaledMax;							// reported scaled max value possible
   17.20 -	long size;								// size in bits of data return from element
   17.21 -	Boolean relative;						// are reports relative to last report (deltas)
   17.22 -	Boolean wrapping;						// does element wrap around (one value higher than max is min)
   17.23 -	Boolean nonLinear;						// are the values reported non-linear relative to element movement
   17.24 -	Boolean preferredState;					// does element have a preferred state (such as a button)
   17.25 -	Boolean nullState;						// does element have null state
   17.26 -*/
   17.27 +	long scaledMin;							/* reported scaled min value possible */
   17.28 +	long scaledMax;							/* reported scaled max value possible */
   17.29 +	long size;								/* size in bits of data return from element */
   17.30 +	Boolean relative;						/* are reports relative to last report (deltas) */
   17.31 +	Boolean wrapping;						/* does element wrap around (one value higher than max is min) */
   17.32 +	Boolean nonLinear;						/* are the values reported non-linear relative to element movement */
   17.33 +	Boolean preferredState;					/* does element have a preferred state (such as a button) */
   17.34 +	Boolean nullState;						/* does element have null state */
   17.35 +#endif /* 0 */
   17.36  
   17.37  	/* runtime variables used for auto-calibration */
   17.38 -	long minReport;							// min returned value
   17.39 -	long maxReport;							// max returned value
   17.40 +	long minReport;							/* min returned value */
   17.41 +	long maxReport;							/* max returned value */
   17.42  	
   17.43 -	struct recElement * pNext;				// next element in list
   17.44 +	struct recElement * pNext;				/* next element in list */
   17.45  };
   17.46  typedef struct recElement recElement;
   17.47  
   17.48  struct joystick_hwdata
   17.49  {
   17.50 -	IOHIDDeviceInterface ** interface;		// interface to device, NULL = no interface
   17.51 +	IOHIDDeviceInterface ** interface;		/* interface to device, NULL = no interface */
   17.52  
   17.53 -	char product[256];							// name of product
   17.54 -	long usage;								// usage page from IOUSBHID Parser.h which defines general usage
   17.55 -	long usagePage;							// usage within above page from IOUSBHID Parser.h which defines specific usage
   17.56 +	char product[256];							/* name of product */
   17.57 +	long usage;								/* usage page from IOUSBHID Parser.h which defines general usage */
   17.58 +	long usagePage;							/* usage within above page from IOUSBHID Parser.h which defines specific usage */
   17.59  
   17.60 -	long axes;								// number of axis (calculated, not reported by device)
   17.61 -	long buttons;							// number of buttons (calculated, not reported by device)
   17.62 -	long hats;								// number of hat switches (calculated, not reported by device)
   17.63 -	long elements;							// number of total elements (shouldbe total of above) (calculated, not reported by device)
   17.64 +	long axes;								/* number of axis (calculated, not reported by device) */
   17.65 +	long buttons;							/* number of buttons (calculated, not reported by device) */
   17.66 +	long hats;								/* number of hat switches (calculated, not reported by device) */
   17.67 +	long elements;							/* number of total elements (shouldbe total of above) (calculated, not reported by device) */
   17.68  
   17.69  	recElement* firstAxis;
   17.70  	recElement* firstButton;
   17.71 @@ -92,7 +92,7 @@
   17.72  	int removed;
   17.73  	int uncentered;
   17.74  
   17.75 -	struct joystick_hwdata* pNext;			// next device
   17.76 +	struct joystick_hwdata* pNext;			/* next device */
   17.77  };
   17.78  typedef struct joystick_hwdata recDevice;
   17.79  
   17.80 @@ -131,32 +131,17 @@
   17.81  		}
   17.82  	}
   17.83  
   17.84 -	// auto user scale
   17.85 +	/* auto user scale */
   17.86  	return hidEvent.value;
   17.87  }
   17.88  
   17.89 -/* similiar to HIDGetElementValue, but auto-calibrates the value before returning it */
   17.90 -
   17.91 -static SInt32 HIDCalibratedValue (recDevice *pDevice, recElement *pElement)
   17.92 -{
   17.93 -	float deviceScale = pElement->max - pElement->min;
   17.94 -	float readScale = pElement->maxReport - pElement->minReport;
   17.95 -	SInt32 value = HIDGetElementValue(pDevice, pElement);
   17.96 -	if (readScale == 0)
   17.97 -		return value; // no scaling at all
   17.98 -	else
   17.99 -		return ((value - pElement->minReport) * deviceScale / readScale) + pElement->min;
  17.100 -}
  17.101 -
  17.102 -/* similiar to HIDCalibratedValue but calibrates to an arbitrary scale instead of the elements default scale */
  17.103 -
  17.104  static SInt32 HIDScaledCalibratedValue (recDevice *pDevice, recElement *pElement, long min, long max)
  17.105  {
  17.106  	float deviceScale = max - min;
  17.107  	float readScale = pElement->maxReport - pElement->minReport;
  17.108  	SInt32 value = HIDGetElementValue(pDevice, pElement);
  17.109  	if (readScale == 0)
  17.110 -		return value; // no scaling at all
  17.111 +		return value; /* no scaling at all */
  17.112  	else
  17.113  		return ((value - pElement->minReport) * deviceScale / readScale) + min;
  17.114  }
  17.115 @@ -191,7 +176,7 @@
  17.116  													kIOCFPlugInInterfaceID, &ppPlugInInterface, &score);
  17.117  		if (kIOReturnSuccess == result)
  17.118  		{
  17.119 -			// Call a method of the intermediate plug-in to create the device interface
  17.120 +			/* Call a method of the intermediate plug-in to create the device interface */
  17.121  			plugInResult = (*ppPlugInInterface)->QueryInterface (ppPlugInInterface,
  17.122  								CFUUIDGetUUIDBytes (kIOHIDDeviceInterfaceID), (void *) &(pDevice->interface));
  17.123  			if (S_OK != plugInResult)
  17.124 @@ -225,15 +210,15 @@
  17.125  	
  17.126  	if ((NULL != pDevice) && (NULL != pDevice->interface))
  17.127  	{
  17.128 -		// close the interface
  17.129 +		/* close the interface */
  17.130  		result = (*(pDevice->interface))->close (pDevice->interface);
  17.131  		if (kIOReturnNotOpen == result)
  17.132  		{
  17.133 -			//  do nothing as device was not opened, thus can't be closed
  17.134 +			/* do nothing as device was not opened, thus can't be closed */
  17.135  		}
  17.136  		else if (kIOReturnSuccess != result)
  17.137  			HIDReportErrorNum ("Failed to close IOHIDDeviceInterface.", result);
  17.138 -		//release the interface
  17.139 +		/* release the interface */
  17.140  		result = (*(pDevice->interface))->Release (pDevice->interface);
  17.141  		if (kIOReturnSuccess != result)
  17.142  			HIDReportErrorNum ("Failed to release IOHIDDeviceInterface.", result);
  17.143 @@ -559,7 +544,7 @@
  17.144  	recDevice *pDeviceNext = NULL;
  17.145  	if (*ppDevice)
  17.146  	{
  17.147 -		// save next device prior to disposing of this device
  17.148 +		/* save next device prior to disposing of this device */
  17.149  		pDeviceNext = (*ppDevice)->pNext;
  17.150  		
  17.151  		/* free element lists */
  17.152 @@ -658,8 +643,9 @@
  17.153  
  17.154  		/* dump device object, it is no longer needed */
  17.155  		result = IOObjectRelease (ioHIDDeviceObject);
  17.156 -//		if (KERN_SUCCESS != result)
  17.157 -//			HIDReportErrorNum ("IOObjectRelease error with ioHIDDeviceObject.", result);
  17.158 +/*		if (KERN_SUCCESS != result)
  17.159 +			HIDReportErrorNum ("IOObjectRelease error with ioHIDDeviceObject.", result);
  17.160 +*/
  17.161  
  17.162  		/* Filter device list to non-keyboard/mouse stuff */ 
  17.163  		if ( (device->usagePage != kHIDPage_GenericDesktop) ||
    18.1 --- a/src/thread/pthread/SDL_syssem.c	Wed Mar 08 18:30:12 2006 +0000
    18.2 +++ b/src/thread/pthread/SDL_syssem.c	Thu Mar 09 06:33:21 2006 +0000
    18.3 @@ -31,6 +31,7 @@
    18.4  
    18.5  #ifdef __MACOSX__
    18.6  #define USE_NAMED_SEMAPHORES 1
    18.7 +#include <unistd.h>
    18.8  #endif
    18.9  
   18.10  struct SDL_semaphore {
    19.1 --- a/src/video/SDL_blit_A.c	Wed Mar 08 18:30:12 2006 +0000
    19.2 +++ b/src/video/SDL_blit_A.c	Thu Mar 09 06:33:21 2006 +0000
    19.3 @@ -502,7 +502,7 @@
    19.4      if (!dstfmt) {
    19.5          dstfmt = &default_pixel_format;
    19.6      }
    19.7 -    vector unsigned char plus = VECUINT8_LITERAL
    19.8 +    const vector unsigned char plus = VECUINT8_LITERAL
    19.9                                              ( 0x00, 0x00, 0x00, 0x00,
   19.10                                                0x04, 0x04, 0x04, 0x04,
   19.11                                                0x08, 0x08, 0x08, 0x08,
   19.12 @@ -863,8 +863,8 @@
   19.13          }
   19.14          ONE_PIXEL_BLEND((UNALIGNED_PTR(dstp)) && (width), width);
   19.15          if (width > 0) {
   19.16 -            // vsrcPermute
   19.17 -            // vdstPermute
   19.18 +            /* vsrcPermute */
   19.19 +            /* vdstPermute */
   19.20              int extrawidth = (width % 4);
   19.21              vector unsigned char valigner = VEC_ALIGNER(srcp);
   19.22              vector unsigned char vs = (vector unsigned char)vec_ld(0, srcp);
    20.1 --- a/src/video/SDL_blit_N.c	Wed Mar 08 18:30:12 2006 +0000
    20.2 +++ b/src/video/SDL_blit_N.c	Thu Mar 09 06:33:21 2006 +0000
    20.3 @@ -119,7 +119,7 @@
    20.4      if (!dstfmt) {
    20.5          dstfmt = &default_pixel_format;
    20.6      }
    20.7 -    vector unsigned char plus = VECUINT8_LITERAL(
    20.8 +    const vector unsigned char plus = VECUINT8_LITERAL(
    20.9                                        0x00, 0x00, 0x00, 0x00,
   20.10                                        0x04, 0x04, 0x04, 0x04,
   20.11                                        0x08, 0x08, 0x08, 0x08,
   20.12 @@ -559,10 +559,11 @@
   20.13      vpermute = calc_swizzle32(srcfmt, dstfmt);
   20.14      if (info->d_width < 16) {
   20.15          if(copy_alpha) {
   20.16 -            return BlitNtoNKeyCopyAlpha(info);
   20.17 +            BlitNtoNKeyCopyAlpha(info);
   20.18          } else {
   20.19 -            return BlitNtoNKey(info);
   20.20 +            BlitNtoNKey(info);
   20.21          }
   20.22 +        return;
   20.23      }
   20.24      vzero = vec_splat_u8(0);
   20.25      if (alpha) {
    21.1 --- a/src/video/quartz/SDL_QuartzEvents.m	Wed Mar 08 18:30:12 2006 +0000
    21.2 +++ b/src/video/quartz/SDL_QuartzEvents.m	Thu Mar 09 06:33:21 2006 +0000
    21.3 @@ -23,8 +23,8 @@
    21.4  
    21.5  #include "SDL_QuartzVideo.h"
    21.6  
    21.7 -#include <IOKit/IOMessage.h> // For wake from sleep detection
    21.8 -#include <IOKit/pwr_mgt/IOPMLib.h> // For wake from sleep detection
    21.9 +#include <IOKit/IOMessage.h> /* For wake from sleep detection */
   21.10 +#include <IOKit/pwr_mgt/IOPMLib.h> /* For wake from sleep detection */
   21.11  #include "SDL_QuartzKeys.h"
   21.12  
   21.13  /* 
   21.14 @@ -681,26 +681,28 @@
   21.15  }
   21.16  
   21.17  
   21.18 -// Try to map Quartz mouse buttons to SDL's lingo...
   21.19 +/* Try to map Quartz mouse buttons to SDL's lingo... */
   21.20  static int QZ_OtherMouseButtonToSDL(int button)
   21.21  {
   21.22      switch (button)
   21.23      {
   21.24          case 0:
   21.25 -            return(SDL_BUTTON_LEFT);   // 1
   21.26 +            return(SDL_BUTTON_LEFT);   /* 1 */
   21.27          case 1:
   21.28 -            return(SDL_BUTTON_RIGHT);  // 3
   21.29 +            return(SDL_BUTTON_RIGHT);  /* 3 */
   21.30          case 2:
   21.31 -            return(SDL_BUTTON_MIDDLE); // 2
   21.32 +            return(SDL_BUTTON_MIDDLE); /* 2 */
   21.33      }
   21.34  
   21.35 -    // >= 3: skip 4 & 5, since those are the SDL mousewheel buttons.
   21.36 +    /* >= 3: skip 4 & 5, since those are the SDL mousewheel buttons. */
   21.37      return(button + 3);
   21.38  }
   21.39  
   21.40  
   21.41  void QZ_PumpEvents (_THIS)
   21.42  {
   21.43 +    static Uint32 screensaverTicks = 0;
   21.44 +    Uint32 nowTicks;
   21.45      int firstMouseEvent;
   21.46      CGMouseDelta dx, dy;
   21.47  
   21.48 @@ -713,8 +715,7 @@
   21.49          return;  /* don't do anything if there's no screen surface. */
   21.50  
   21.51      /* Update activity every five seconds to prevent screensaver. --ryan. */
   21.52 -    static Uint32 screensaverTicks = 0;
   21.53 -    Uint32 nowTicks = SDL_GetTicks();
   21.54 +    nowTicks = SDL_GetTicks();
   21.55      if ((nowTicks - screensaverTicks) > 5000)
   21.56      {
   21.57          UpdateSystemActivity(UsrActivity);
    22.1 --- a/src/video/quartz/SDL_QuartzVideo.m	Wed Mar 08 18:30:12 2006 +0000
    22.2 +++ b/src/video/quartz/SDL_QuartzVideo.m	Thu Mar 09 06:33:21 2006 +0000
    22.3 @@ -682,7 +682,7 @@
    22.4              return NULL;
    22.5          }
    22.6      
    22.7 -        //[ qz_window setReleasedWhenClosed:YES ];
    22.8 +        /*[ qz_window setReleasedWhenClosed:YES ];*/
    22.9          QZ_SetCaption(this, this->wm_title, this->wm_icon);
   22.10          [ qz_window setAcceptsMouseMovedEvents:YES ];
   22.11          [ qz_window setViewsNeedDisplay:NO ];
   22.12 @@ -759,7 +759,7 @@
   22.13              
   22.14              int hOffset = [ window_view frame ].origin.x;
   22.15                      
   22.16 -            current->pixels += (vOffset * current->pitch) + hOffset * (qdbpp/8);
   22.17 +            current->pixels = (Uint8 *)current->pixels + (vOffset * current->pitch) + hOffset * (qdbpp/8);
   22.18          }
   22.19          this->UpdateRects     = QZ_UpdateRects;
   22.20          this->LockHWSurface   = QZ_LockWindow;
   22.21 @@ -921,7 +921,7 @@
   22.22           *  a fullscreen resolution smaller than the hardware could supply
   22.23           *  so SDL is centering it in a bigger resolution)...
   22.24           */
   22.25 -        dst = CGDisplayBaseAddress (display_id) + SDL_VideoSurface->offset;
   22.26 +        dst = (Uint8 *)CGDisplayBaseAddress (display_id) + SDL_VideoSurface->offset;
   22.27          src = current_buffer + SDL_VideoSurface->offset;
   22.28          len = SDL_VideoSurface->w * SDL_VideoSurface->format->BytesPerPixel;
   22.29          h = SDL_VideoSurface->h;
   22.30 @@ -1025,7 +1025,7 @@
   22.31      who supplied sample code for Carbon.
   22.32  */
   22.33  
   22.34 -//#define TEST_OBSCURED 1
   22.35 +/*#define TEST_OBSCURED 1*/
   22.36  
   22.37  #if TEST_OBSCURED
   22.38  #include "CGS.h"
   22.39 @@ -1075,7 +1075,6 @@
   22.40  
   22.41      CGSRect contentRect;
   22.42      int     windowNumber;
   22.43 -    //int     isMainWindow;
   22.44      int     firstDockIcon;
   22.45      int     dockIconCacheMiss;
   22.46      int     windowContentOffset;
   22.47 @@ -1106,7 +1105,6 @@
   22.48                  windowContentOffset = 0;
   22.49  
   22.50              windowNumber = [ window windowNumber ];
   22.51 -            //isMainWindow = [ window isMainWindow ];
   22.52  
   22.53              /* The window list is sorted according to order on the screen */
   22.54              count = 0;
    23.1 --- a/src/video/quartz/SDL_QuartzWindow.m	Wed Mar 08 18:30:12 2006 +0000
    23.2 +++ b/src/video/quartz/SDL_QuartzWindow.m	Thu Mar 09 06:33:21 2006 +0000
    23.3 @@ -144,7 +144,7 @@
    23.4                  
    23.5                  int hOffset = newViewFrame.origin.x;
    23.6                          
    23.7 -                SDL_VideoSurface->pixels += (vOffset * SDL_VideoSurface->pitch) + hOffset * (device_bpp/8);
    23.8 +                SDL_VideoSurface->pixels = (Uint8 *)SDL_VideoSurface->pixels + (vOffset * SDL_VideoSurface->pitch) + hOffset * (device_bpp/8);
    23.9              }
   23.10              
   23.11              UnlockPortBits ( thePort );
   23.12 @@ -177,7 +177,7 @@
   23.13      /* restore cached image, since it may not be current, post expose event too */
   23.14      [ self restoreCachedImage ];
   23.15      
   23.16 -    //SDL_PrivateExpose ();
   23.17 +    /*SDL_PrivateExpose ();*/
   23.18      
   23.19      SDL_PrivateAppActive (1, SDL_APPACTIVE);
   23.20  }