MacOS X volunteer needed

The SDL CD-ROM code on MacOS X is in C++, and we’d like to remove any
dependency on C++ for MacOS X, to avoid runtime compatibility problems
between MacOS X 10.3 and 10.4.

So, any volunteers to rewrite the code in src/cdrom/macosx/* in C?

Thanks,
-Sam Lantinga, Software Engineer, Blizzard Entertainment

Sam Lantinga wrote:

The SDL CD-ROM code on MacOS X is in C++, and we’d like to remove any
dependency on C++ for MacOS X, to avoid runtime compatibility problems
between MacOS X 10.3 and 10.4.

So, any volunteers to rewrite the code in src/cdrom/macosx/* in C?

I did a first try to “convert” it, currently debugging:
http://www.algonet.se/~afb/libsdl/SDL-cdrom-macosx.zip

I left the Apple-style gotos, and the other C++ stuff in.
Made one _Construct and one _Destruct function, to match:

60,63c59,62
< class AudioFilePlayer
< {
< public:
< AudioFilePlayer (const FSRef *inFileRef);—

typedef struct AudioFilePlayer AudioFilePlayer;

AudioFilePlayer *AudioFilePlayer_Construct (const FSRef    

*inFileRef);
65c64
< ~AudioFilePlayer();

void AudioFilePlayer_Destruct(AudioFilePlayer *);

Most of the SDL code was straightforward, the main difference
was in the used Apple sample code that was all written in C++.

Some of it also has their nasty sample code disclaimer, too ?
(mostly the CAGuard class, used for the mutex implementation)

HTH,
–anders

PS. It doesn’t really work (yet), probably messed something up

The SDL CD-ROM code on MacOS X is in C++, and we’d like to remove any
dependency on C++ for MacOS X, to avoid runtime compatibility problems
between MacOS X 10.3 and 10.4.

So, any volunteers to rewrite the code in src/cdrom/macosx/* in C?

Just committed a C-only version to CVS. Can someone update the makefiles
to reference the new filenames? The .cpp files are now .c, and CAGuard.*
becames SDLOSXCAGuard.*, so it won’t ever be mistaken for the files in
/Developer/Examples from where they were copied.

–ryan.

Can someone update the makefiles to reference the new filenames?

Er, and by “makefiles” I mean “XCode projects” … late night. :slight_smile:

–ryan.

Can someone update the makefiles to reference the new filenames?
Er, and by “makefiles” I mean “XCode projects” … late night. :slight_smile:

–ryan.

I just sent an updated Xcode2.1 project with the appropriate changes to Sam.

Thanks,
Eric