Mercurial > sdl-ios-xcode
changeset 1424:7a610f25c12f
Updated MacOS Classic MPW build
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Fri, 24 Feb 2006 09:57:14 +0000 |
parents | 4ed717f9e509 |
children | aea151eb97b8 |
files | MPWmake.sea.bin Makefile.in include/SDL_config.h include/SDL_config_dreamcast.h include/SDL_config_macos.h include/SDL_config_macosx.h include/SDL_opengl.h src/endian/.cvsignore src/main/macos/SDL_main.c src/main/macos/exports/SDL.x src/main/macos/exports/gendef.pl src/video/e_pow.h src/video/e_sqrt.h src/video/maccommon/SDL_lowvideo.h src/video/maccommon/SDL_macevents_c.h src/video/maccommon/SDL_macgl_c.h src/video/maccommon/SDL_macmouse_c.h src/video/maccommon/SDL_macwm_c.h src/video/macdsp/SDL_dspvideo.c src/video/macdsp/SDL_dspvideo.h src/video/macrom/SDL_romvideo.c src/video/macrom/SDL_romvideo.h src/video/math_private.h test/testplatform.c |
diffstat | 24 files changed, 397 insertions(+), 101 deletions(-) [+] |
line wrap: on
line diff
--- a/Makefile.in Fri Feb 24 08:17:28 2006 +0000 +++ b/Makefile.in Fri Feb 24 09:57:14 2006 +0000 @@ -145,3 +145,13 @@ rpm: $(distfile) rpmbuild -ta $? + +# Create a CVS snapshot that people can run update -d on +CVSROOT = :pserver:guest@libsdl.org:/home/sdlweb/libsdl.org/cvs +snapshot: + cvs -d $(CVSROOT) login + cvs -d $(CVSROOT) checkout -P SDL12 + (cd SDL12 && ./autogen.sh && rm -rf autom4te.cache) + mv SDL12 SDL-1.2 + tar zcvf $(HOME)/SDL-1.2.tar.gz SDL-1.2 + rm -rf SDL-1.2
--- a/include/SDL_config.h Fri Feb 24 08:17:28 2006 +0000 +++ b/include/SDL_config.h Fri Feb 24 09:57:14 2006 +0000 @@ -1,3 +1,4 @@ +/* include/SDL_config.h. Generated by configure. */ /* SDL - Simple DirectMedia Layer Copyright (C) 1997-2006 Sam Lantinga @@ -23,32 +24,269 @@ #ifndef _SDL_config_h #define _SDL_config_h +/* This is a set of defines to configure the SDL features */ + +/* General platform specific identifiers */ #include "SDL_platform.h" -/* Add any platform that doesn't build using the configure system */ -#if defined(__AMIGA__) -#include "SDL_config_amiga.h" -#elif defined(__DREAMCAST__) -#include "SDL_config_dreamcast.h" -#elif defined(__MACOS__) -#include "SDL_config_macos.h" -#elif defined(__MACOSX__) -#include "SDL_config_macosx.h" -#elif defined(__WIN32__) -#include "SDL_config_win32.h" +/* C language features */ +/* #undef const */ +/* #undef inline */ +/* #undef volatile */ + +/* C datatypes */ +/* #undef size_t */ +/* #undef int8_t */ +/* #undef uint8_t */ +/* #undef int16_t */ +/* #undef uint16_t */ +/* #undef int32_t */ +/* #undef uint32_t */ +/* #undef int64_t */ +/* #undef uint64_t */ +/* #undef uintptr_t */ +#define SDL_HAS_64BIT_TYPE 1 + +/* Endianness */ +#define SDL_BYTEORDER 1234 + +/* Comment this if you want to build without any C library requirements */ +#define HAVE_LIBC 1 +#if HAVE_LIBC + +/* Useful headers */ +#define HAVE_ALLOCA_H 1 +#define HAVE_SYS_TYPES_H 1 +#define HAVE_STDIO_H 1 +#define STDC_HEADERS 1 +#define HAVE_STDLIB_H 1 +#define HAVE_STDARG_H 1 +#define HAVE_MALLOC_H 1 +#define HAVE_MEMORY_H 1 +#define HAVE_STRING_H 1 +#define HAVE_STRINGS_H 1 +#define HAVE_INTTYPES_H 1 +#define HAVE_STDINT_H 1 +#define HAVE_CTYPE_H 1 +#define HAVE_MATH_H 1 +#define HAVE_SIGNAL_H 1 +/* #undef HAVE_ALTIVEC_H */ + +/* C library functions */ +#define HAVE_MALLOC 1 +#define HAVE_CALLOC 1 +#define HAVE_REALLOC 1 +#define HAVE_FREE 1 +#define HAVE_ALLOCA 1 +#ifndef _WIN32 /* Don't use C runtime versions of these on Windows */ +#define HAVE_GETENV 1 +#define HAVE_PUTENV 1 +#define HAVE_UNSETENV 1 +#endif +#define HAVE_QSORT 1 +#define HAVE_ABS 1 +#define HAVE_BCOPY 1 +#define HAVE_MEMSET 1 +#define HAVE_MEMCPY 1 +#define HAVE_MEMMOVE 1 +#define HAVE_MEMCMP 1 +#define HAVE_STRLEN 1 +/* #undef HAVE_STRLCPY */ +/* #undef HAVE_STRLCAT */ +#define HAVE_STRDUP 1 +/* #undef HAVE__STRREV */ +/* #undef HAVE__STRUPR */ +/* #undef HAVE__STRLWR */ +/* #undef HAVE_INDEX */ +/* #undef HAVE_RINDEX */ +#define HAVE_STRCHR 1 +#define HAVE_STRRCHR 1 +#define HAVE_STRSTR 1 +/* #undef HAVE_ITOA */ +/* #undef HAVE__LTOA */ +/* #undef HAVE__UITOA */ +/* #undef HAVE__ULTOA */ +#define HAVE_STRTOL 1 +/* #undef HAVE__I64TOA */ +/* #undef HAVE__UI64TOA */ +#define HAVE_STRTOLL 1 +#define HAVE_STRTOD 1 +#define HAVE_ATOI 1 +#define HAVE_ATOF 1 +#define HAVE_STRCMP 1 +#define HAVE_STRNCMP 1 +/* #undef HAVE_STRICMP */ +#define HAVE_STRCASECMP 1 +#define HAVE_SSCANF 1 +#define HAVE_SNPRINTF 1 +#define HAVE_VSNPRINTF 1 +#define HAVE_SIGACTION 1 +#define HAVE_SETJMP 1 +#define HAVE_NANOSLEEP 1 +/* #undef HAVE_CLOCK_GETTIME */ +#define HAVE_DLVSYM 1 + #else -/* This is the minimal configuration that can be used to build SDL */ +/* We may need some replacement for stdarg.h here */ +#include <stdarg.h> +#endif /* HAVE_LIBC */ + +/* Allow disabling of core subsystems */ +/* #undef SDL_AUDIO_DISABLED */ +/* #undef SDL_CDROM_DISABLED */ +/* #undef SDL_CPUINFO_DISABLED */ +/* #undef SDL_EVENTS_DISABLED */ +/* #undef SDL_FILE_DISABLED */ +/* #undef SDL_JOYSTICK_DISABLED */ +/* #undef SDL_LOADSO_DISABLED */ +/* #undef SDL_THREADS_DISABLED */ +/* #undef SDL_TIMERS_DISABLED */ +/* #undef SDL_VIDEO_DISABLED */ -#include <stdarg.h> +/* Enable various audio drivers */ +/* #undef SDL_AUDIO_DRIVER_AHI */ +#define SDL_AUDIO_DRIVER_ALSA 1 +#define SDL_AUDIO_DRIVER_ALSA_DYNAMIC "libasound.so.2" +#define SDL_AUDIO_DRIVER_ARTS 1 +#define SDL_AUDIO_DRIVER_ARTS_DYNAMIC "libartsc.so.0" +/* #undef SDL_AUDIO_DRIVER_BAUDIO */ +/* #undef SDL_AUDIO_DRIVER_COREAUDIO */ +/* #undef SDL_AUDIO_DRIVER_DART */ +/* #undef SDL_AUDIO_DRIVER_DC */ +#define SDL_AUDIO_DRIVER_DISK 1 +/* #undef SDL_AUDIO_DRIVER_DMEDIA */ +/* #undef SDL_AUDIO_DRIVER_DSOUND */ +#define SDL_AUDIO_DRIVER_ESD 1 +/* #undef SDL_AUDIO_DRIVER_ESD_DYNAMIC */ +/* #undef SDL_AUDIO_DRIVER_MINT */ +/* #undef SDL_AUDIO_DRIVER_MMEAUDIO */ +#define SDL_AUDIO_DRIVER_NAS 1 +/* #undef SDL_AUDIO_DRIVER_OPENBSD */ +#define SDL_AUDIO_DRIVER_OSS 1 +/* #undef SDL_AUDIO_DRIVER_OSS_SOUNDCARD_H */ +/* #undef SDL_AUDIO_DRIVER_PAUD */ +/* #undef SDL_AUDIO_DRIVER_QNXNTO */ +/* #undef SDL_AUDIO_DRIVER_SNDMGR */ +/* #undef SDL_AUDIO_DRIVER_SUNAUDIO */ +/* #undef SDL_AUDIO_DRIVER_WAVEOUT */ + +/* Enable various cdrom drivers */ +/* #undef SDL_CDROM_AIX */ +/* #undef SDL_CDROM_BEOS */ +/* #undef SDL_CDROM_BSDI */ +/* #undef SDL_CDROM_DC */ +/* #undef SDL_CDROM_DUMMY */ +/* #undef SDL_CDROM_FREEBSD */ +#define SDL_CDROM_LINUX 1 +/* #undef SDL_CDROM_MACOS */ +/* #undef SDL_CDROM_MACOSX */ +/* #undef SDL_CDROM_MINT */ +/* #undef SDL_CDROM_OPENBSD */ +/* #undef SDL_CDROM_OS2 */ +/* #undef SDL_CDROM_OSF */ +/* #undef SDL_CDROM_QNX */ +/* #undef SDL_CDROM_WIN32 */ + +/* Enable various input drivers */ +/* #undef SDL_INPUT_TSLIB */ +/* #undef SDL_JOYSTICK_AMIGA */ +/* #undef SDL_JOYSTICK_BEOS */ +/* #undef SDL_JOYSTICK_DC */ +/* #undef SDL_JOYSTICK_DUMMY */ +/* #undef SDL_JOYSTICK_IOKIT */ +#define SDL_JOYSTICK_LINUX 1 +/* #undef SDL_JOYSTICK_LINUXEV */ +/* #undef SDL_JOYSTICK_MACOS */ +/* #undef SDL_JOYSTICK_MINT */ +/* #undef SDL_JOYSTICK_OS2 */ +/* #undef SDL_JOYSTICK_RISCOS */ +/* #undef SDL_JOYSTICK_WINMM */ +/* #undef SDL_JOYSTICK_USBHID */ -typedef signed char int8_t; -typedef unsigned char uint8_t; -typedef signed short int16_t; -typedef unsigned short uint16_t; -typedef signed int int32_t; -typedef unsigned int uint32_t; -typedef unsigned int size_t; -typedef unsigned long uintptr_t; -#endif +/* Enable various shared object loading systems */ +/* #undef SDL_LOADSO_BEOS */ +/* #undef SDL_LOADSO_DLCOMPAT */ +#define SDL_LOADSO_DLOPEN 1 +/* #undef SDL_LOADSO_LDG */ +/* #undef SDL_LOADSO_MACOS */ +/* #undef SDL_LOADSO_OS2 */ +/* #undef SDL_LOADSO_WIN32 */ + +/* Enable various threading systems */ +/* #undef SDL_THREAD_AMIGA */ +/* #undef SDL_THREAD_BEOS */ +/* #undef SDL_THREAD_DC */ +/* #undef SDL_THREAD_EPOC */ +/* #undef SDL_THREAD_OS2 */ +/* #undef SDL_THREAD_PTH */ +#define SDL_THREAD_PTHREAD 1 +#define SDL_THREAD_PTHREAD_RECURSIVE_MUTEX 1 +/* #undef SDL_THREAD_PTHREAD_RECURSIVE_MUTEX_NP */ +/* #undef SDL_THREAD_SPROC */ +/* #undef SDL_THREAD_WIN32 */ + +/* Enable various timer systems */ +/* #undef SDL_TIMER_AMIGA */ +/* #undef SDL_TIMER_BEOS */ +/* #undef SDL_TIMER_DC */ +/* #undef SDL_TIMER_EPOC */ +/* #undef SDL_TIMER_MACOS */ +/* #undef SDL_TIMER_MINT */ +/* #undef SDL_TIMER_OS2 */ +/* #undef SDL_TIMER_RISCOS */ +#define SDL_TIMER_UNIX 1 +/* #undef SDL_TIMER_WIN32 */ +/* #undef SDL_TIMER_WINCE */ + +/* Enable various video drivers */ +/* #undef SDL_VIDEO_DRIVER_AALIB */ +/* #undef SDL_VIDEO_DRIVER_BWINDOW */ +/* #undef SDL_VIDEO_DRIVER_CYBERGRAPHICS */ +/* #undef SDL_VIDEO_DRIVER_DC */ +/* #undef SDL_VIDEO_DRIVER_DDRAW */ +#define SDL_VIDEO_DRIVER_DGA 1 +/* #undef SDL_VIDEO_DRIVER_DIRECTFB */ +/* #undef SDL_VIDEO_DRIVER_DRAWSPROCKET */ +#define SDL_VIDEO_DRIVER_DUMMY 1 +/* #undef SDL_VIDEO_DRIVER_EPOC */ +#define SDL_VIDEO_DRIVER_FBCON 1 +/* #undef SDL_VIDEO_DRIVER_GAPI */ +/* #undef SDL_VIDEO_DRIVER_GEM */ +/* #undef SDL_VIDEO_DRIVER_GGI */ +/* #undef SDL_VIDEO_DRIVER_IPOD */ +/* #undef SDL_VIDEO_DRIVER_NANOX */ +/* #undef SDL_VIDEO_DRIVER_OS2FS */ +/* #undef SDL_VIDEO_DRIVER_PHOTON */ +/* #undef SDL_VIDEO_DRIVER_PICOGUI */ +/* #undef SDL_VIDEO_DRIVER_PS2GS */ +/* #undef SDL_VIDEO_DRIVER_QTOPIA */ +/* #undef SDL_VIDEO_DRIVER_QUARTZ */ +/* #undef SDL_VIDEO_DRIVER_RISCOS */ +/* #undef SDL_VIDEO_DRIVER_SVGALIB */ +/* #undef SDL_VIDEO_DRIVER_TOOLBOX */ +/* #undef SDL_VIDEO_DRIVER_VGL */ +/* #undef SDL_VIDEO_DRIVER_WINDIB */ +/* #undef SDL_VIDEO_DRIVER_WSCONS */ +#define SDL_VIDEO_DRIVER_X11 1 +#define SDL_VIDEO_DRIVER_X11_DGAMOUSE 1 +#define SDL_VIDEO_DRIVER_X11_DYNAMIC "libX11.so.6" +#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT "libXext.so.6" +#define SDL_VIDEO_DRIVER_X11_VIDMODE 1 +#define SDL_VIDEO_DRIVER_X11_XINERAMA 1 +#define SDL_VIDEO_DRIVER_X11_XME 1 +#define SDL_VIDEO_DRIVER_X11_XV 1 +/* #undef SDL_VIDEO_DRIVER_XBIOS */ + +/* Enable OpenGL support */ +#define SDL_VIDEO_OPENGL 1 +#define SDL_VIDEO_OPENGL_GLX 1 +/* #undef SDL_VIDEO_OPENGL_WGL */ +/* #undef SDL_VIDEO_OPENGL_OSMESA */ +/* #undef SDL_VIDEO_OPENGL_OSMESA_DYNAMIC */ + +/* Enable assembly routines */ +#define SDL_ASSEMBLY_ROUTINES 1 +/* #undef SDL_HERMES_BLITTERS */ +/* #undef SDL_ALTIVEC_BLITTERS */ #endif /* _SDL_config_h */
--- a/include/SDL_config_dreamcast.h Fri Feb 24 08:17:28 2006 +0000 +++ b/include/SDL_config_dreamcast.h Fri Feb 24 09:57:14 2006 +0000 @@ -41,10 +41,8 @@ #define HAVE_REALLOC 1 #define HAVE_FREE 1 #define HAVE_ALLOCA 1 -#ifndef _WIN32 /* Don't use C runtime versions of these on Windows */ #define HAVE_GETENV 1 #define HAVE_PUTENV 1 -#endif #define HAVE_MEMSET 1 #define HAVE_MEMCPY 1 #define HAVE_MEMMOVE 1
--- a/include/SDL_config_macos.h Fri Feb 24 08:17:28 2006 +0000 +++ b/include/SDL_config_macos.h Fri Feb 24 09:57:14 2006 +0000 @@ -25,14 +25,17 @@ /* This is a set of defines to configure the SDL features */ -#define SDL_HAS_64BIT_TYPE 1 +typedef signed char int8_t; +typedef unsigned char uint8_t; +typedef signed short int16_t; +typedef unsigned short uint16_t; +typedef signed int int32_t; +typedef unsigned int uint32_t; /* Useful headers */ -#define HAVE_SYS_TYPES_H 1 #define HAVE_STDIO_H 1 #define STDC_HEADERS 1 #define HAVE_STRING_H 1 -#define HAVE_INTTYPES_H 1 #define HAVE_SIGNAL_H 1 /* C library functions */ @@ -41,10 +44,6 @@ #define HAVE_REALLOC 1 #define HAVE_FREE 1 #define HAVE_ALLOCA 1 -#ifndef _WIN32 /* Don't use C runtime versions of these on Windows */ -#define HAVE_GETENV 1 -#define HAVE_PUTENV 1 -#endif #define HAVE_MEMSET 1 #define HAVE_MEMCPY 1 #define HAVE_MEMMOVE 1 @@ -63,7 +62,7 @@ #define SDL_LOADSO_MACOS 1 /* Enable various threading systems */ -#define SDL_THREAD_DISABLED 1 +#define SDL_THREADS_DISABLED 1 /* Enable various timer systems */ #define SDL_TIMER_MACOS 1
--- a/include/SDL_config_macosx.h Fri Feb 24 08:17:28 2006 +0000 +++ b/include/SDL_config_macosx.h Fri Feb 24 09:57:14 2006 +0000 @@ -41,10 +41,8 @@ #define HAVE_REALLOC 1 #define HAVE_FREE 1 #define HAVE_ALLOCA 1 -#ifndef _WIN32 /* Don't use C runtime versions of these on Windows */ #define HAVE_GETENV 1 #define HAVE_PUTENV 1 -#endif #define HAVE_MEMSET 1 #define HAVE_MEMCPY 1 #define HAVE_MEMMOVE 1
--- a/include/SDL_opengl.h Fri Feb 24 08:17:28 2006 +0000 +++ b/include/SDL_opengl.h Fri Feb 24 09:57:14 2006 +0000 @@ -34,9 +34,12 @@ #ifndef NO_SDL_GLEXT #define __glext_h_ /* Don't let gl.h include glext.h */ #endif -#ifdef __MACOSX__ +#if defined(__MACOSX__) #include <OpenGL/gl.h> /* Header File For The OpenGL Library */ #include <OpenGL/glu.h> /* Header File For The GLU Library */ +#elif defined(__MACOS__) +#include <gl.h> /* Header File For The OpenGL Library */ +#include <glu.h> /* Header File For The GLU Library */ #else #include <GL/gl.h> /* Header File For The OpenGL Library */ #include <GL/glu.h> /* Header File For The GLU Library */
--- a/src/endian/.cvsignore Fri Feb 24 08:17:28 2006 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,6 +0,0 @@ -Makefile.in -Makefile -.libs -*.o -*.lo -*.la
--- a/src/main/macos/SDL_main.c Fri Feb 24 08:17:28 2006 +0000 +++ b/src/main/macos/SDL_main.c Fri Feb 24 09:57:14 2006 +0000 @@ -24,10 +24,6 @@ in the MacOS environment. (stdio/stderr is *not* directed for Mach-O builds) */ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <ctype.h> #if defined(__APPLE__) && defined(__MACH__) #include <Carbon/Carbon.h> #elif TARGET_API_MAC_CARBON && (UNIVERSAL_INTERFACES_VERSION > 0x0335) @@ -89,7 +85,7 @@ argc = 0; for ( bufp = cmdline; *bufp; ) { /* Skip leading whitespace */ - while ( isspace(*bufp) ) { + while ( SDL_isspace(*bufp) ) { ++bufp; } /* Skip over argument */ @@ -113,7 +109,7 @@ ++argc; } /* Skip over word */ - while ( *bufp && ! isspace(*bufp) ) { + while ( *bufp && ! SDL_isspace(*bufp) ) { ++bufp; } } @@ -176,7 +172,7 @@ if ( noErr != GetProcessInformation (&process, &process_info) ) return 0; - memcpy (name, process_fsp.name, process_fsp.name[0] + 1); + SDL_memcpy(name, process_fsp.name, process_fsp.name[0] + 1); return 1; } @@ -205,8 +201,8 @@ if (app_name[0] > MAX_NAME ) app_name[0] = MAX_NAME; - memcpy (prefs_name + 1, app_name + 1, app_name[0]); - memcpy (prefs_name + app_name[0] + 1, SUFFIX, strlen (SUFFIX)); + SDL_memcpy(prefs_name + 1, app_name + 1, app_name[0]); + SDL_memcpy(prefs_name + app_name[0] + 1, SUFFIX, strlen (SUFFIX)); prefs_name[0] = app_name[0] + strlen (SUFFIX); /* Make the file spec for prefs file */ @@ -215,7 +211,7 @@ return 0; else { /* Create the prefs file */ - memcpy (prefs_fsp->name, prefs_name, prefs_name[0] + 1); + SDL_memcpy(prefs_fsp->name, prefs_name, prefs_name[0] + 1); prefs_fsp->parID = directory_id; prefs_fsp->vRefNum = volume_ref_number; @@ -241,11 +237,11 @@ HLock(prefs_handle); /* Get command line string */ - memcpy (prefs->command_line, *prefs_handle, (*prefs_handle)[0]+1); + SDL_memcpy(prefs->command_line, *prefs_handle, (*prefs_handle)[0]+1); /* Get video driver name */ offset += (*prefs_handle)[0] + 1; - memcpy (prefs->video_driver_name, *prefs_handle + offset, (*prefs_handle)[offset] + 1); + SDL_memcpy(prefs->video_driver_name, *prefs_handle + offset, (*prefs_handle)[offset] + 1); /* Get save-to-file option (1 or 0) */ offset += (*prefs_handle)[offset] + 1; @@ -278,11 +274,11 @@ /* Command line text */ offset = 0; - memcpy (*prefs_handle, prefs->command_line, prefs->command_line[0] + 1); + SDL_memcpy(*prefs_handle, prefs->command_line, prefs->command_line[0] + 1); /* Video driver name */ offset += prefs->command_line[0] + 1; - memcpy (*prefs_handle + offset, prefs->video_driver_name, prefs->video_driver_name[0] + 1); + SDL_memcpy(*prefs_handle + offset, prefs->video_driver_name, prefs->video_driver_name[0] + 1); /* Output-to-file option */ offset += prefs->video_driver_name[0] + 1; @@ -436,9 +432,9 @@ if ( readPreferences (&prefs) ) { - if (memcmp (prefs.video_driver_name+1, "DSp", 3) == 0) + if (SDL_memcmp(prefs.video_driver_name+1, "DSp", 3) == 0) videodriver = 1; - else if (memcmp (prefs.video_driver_name+1, "toolbox", 7) == 0) + else if (SDL_memcmp(prefs.video_driver_name+1, "toolbox", 7) == 0) videodriver = 2; } @@ -540,12 +536,12 @@ /* Set pseudo-environment variables for video driver, update prefs */ switch ( videodriver ) { case VIDEO_ID_DRAWSPROCKET: - putenv ("SDL_VIDEODRIVER=DSp"); - memcpy (prefs.video_driver_name, "\pDSp", 4); + SDL_putenv("SDL_VIDEODRIVER=DSp"); + SDL_memcpy(prefs.video_driver_name, "\pDSp", 4); break; case VIDEO_ID_TOOLBOX: - putenv ("SDL_VIDEODRIVER=toolbox"); - memcpy (prefs.video_driver_name, "\ptoolbox", 8); + SDL_putenv("SDL_VIDEODRIVER=toolbox"); + SDL_memcpy(prefs.video_driver_name, "\ptoolbox", 8); break; } @@ -582,9 +578,9 @@ if ( appNameText[i] == ' ' ) appNameText[i] = '_'; /* Copy app name & full command text to command-line C-string */ - memcpy (commandLine, appNameText + 1, appNameText[0]); + SDL_memcpy(commandLine, appNameText + 1, appNameText[0]); commandLine[appNameText[0]] = ' '; - memcpy (commandLine + appNameText[0] + 1, prefs.command_line + 1, prefs.command_line[0]); + SDL_memcpy(commandLine + appNameText[0] + 1, prefs.command_line + 1, prefs.command_line[0]); commandLine[ appNameText[0] + 1 + prefs.command_line[0] ] = '\0'; /* Parse C-string into argv and argc */
--- a/src/main/macos/exports/SDL.x Fri Feb 24 08:17:28 2006 +0000 +++ b/src/main/macos/exports/SDL.x Fri Feb 24 09:57:14 2006 +0000 @@ -37,18 +37,6 @@ SDL_HasSSE SDL_HasSSE2 SDL_HasAltiVec - SDL_ReadLE16 - SDL_ReadBE16 - SDL_ReadLE32 - SDL_ReadBE32 - SDL_ReadLE64 - SDL_ReadBE64 - SDL_WriteLE16 - SDL_WriteBE16 - SDL_WriteLE32 - SDL_WriteBE32 - SDL_WriteLE64 - SDL_WriteBE64 SDL_SetError SDL_GetError SDL_ClearError @@ -61,8 +49,6 @@ SDL_SetEventFilter SDL_GetEventFilter SDL_EventState - SDL_putenv - SDL_getenv SDL_NumJoysticks SDL_JoystickName SDL_JoystickOpen @@ -119,8 +105,21 @@ SDL_RWFromConstMem SDL_AllocRW SDL_FreeRW + SDL_ReadLE16 + SDL_ReadBE16 + SDL_ReadLE32 + SDL_ReadBE32 + SDL_ReadLE64 + SDL_ReadBE64 + SDL_WriteLE16 + SDL_WriteBE16 + SDL_WriteLE32 + SDL_WriteBE32 + SDL_WriteLE64 + SDL_WriteBE64 SDL_GetWMInfo SDL_CreateThread + SDL_CreateThread SDL_ThreadID SDL_GetThreadID SDL_WaitThread @@ -188,4 +187,28 @@ SDL_WM_ToggleFullScreen SDL_WM_GrabInput SDL_SoftStretch + SDL_putenv + SDL_getenv + SDL_qsort + SDL_revcpy + SDL_strlen + SDL_strlcpy + SDL_strlcat + SDL_strdup + SDL_strrev + SDL_strupr + SDL_strlwr + SDL_strchr + SDL_strrchr + SDL_strstr + SDL_ltoa + SDL_ultoa + SDL_strtol + SDL_strtod + SDL_strcmp + SDL_strncmp + SDL_strcasecmp + SDL_sscanf + SDL_snprintf + SDL_vsnprintf SDL_InitQuickDraw
--- a/src/main/macos/exports/gendef.pl Fri Feb 24 08:17:28 2006 +0000 +++ b/src/main/macos/exports/gendef.pl Fri Feb 24 09:57:14 2006 +0000 @@ -23,4 +23,28 @@ } # Special exports to include for this platform +print "\tSDL_putenv\n"; +print "\tSDL_getenv\n"; +print "\tSDL_qsort\n"; +print "\tSDL_revcpy\n"; +print "\tSDL_strlen\n"; +print "\tSDL_strlcpy\n"; +print "\tSDL_strlcat\n"; +print "\tSDL_strdup\n"; +print "\tSDL_strrev\n"; +print "\tSDL_strupr\n"; +print "\tSDL_strlwr\n"; +print "\tSDL_strchr\n"; +print "\tSDL_strrchr\n"; +print "\tSDL_strstr\n"; +print "\tSDL_ltoa\n"; +print "\tSDL_ultoa\n"; +print "\tSDL_strtol\n"; +print "\tSDL_strtod\n"; +print "\tSDL_strcmp\n"; +print "\tSDL_strncmp\n"; +print "\tSDL_strcasecmp\n"; +print "\tSDL_sscanf\n"; +print "\tSDL_snprintf\n"; +print "\tSDL_vsnprintf\n"; print "\tSDL_InitQuickDraw\n";
--- a/src/video/e_pow.h Fri Feb 24 08:17:28 2006 +0000 +++ b/src/video/e_pow.h Fri Feb 24 09:57:14 2006 +0000 @@ -296,7 +296,7 @@ z = one-(r-z); GET_HIGH_WORD(j,z); j += (n<<20); - if((j>>20)<=0) z = scalbn(z,n); /* subnormal output */ + if((j>>20)<=0) z = SDL_NAME(scalbn)(z,n); /* subnormal output */ else SET_HIGH_WORD(z,j); return s*z; }
--- a/src/video/e_sqrt.h Fri Feb 24 08:17:28 2006 +0000 +++ b/src/video/e_sqrt.h Fri Feb 24 09:57:14 2006 +0000 @@ -88,9 +88,9 @@ #include "math_private.h" #ifdef __STDC__ - double copysign(double x, double y) + double SDL_NAME(copysign)(double x, double y) #else - double copysign(x,y) + double SDL_NAME(copysign)(x,y) double x,y; #endif { @@ -102,9 +102,9 @@ } #ifdef __STDC__ - double scalbn (double x, int n) + double SDL_NAME(scalbn) (double x, int n) #else - double scalbn (x,n) + double SDL_NAME(scalbn) (x,n) double x; int n; #endif { @@ -120,13 +120,13 @@ } if (k==0x7ff) return x+x; /* NaN or Inf */ k = k+n; - if (k > 0x7fe) return huge*copysign(huge,x); /* overflow */ + if (k > 0x7fe) return huge*SDL_NAME(copysign)(huge,x); /* overflow */ if (k > 0) /* normal result */ {SET_HIGH_WORD(x,(hx&0x800fffff)|(k<<20)); return x;} if (k <= -54) { if (n > 50000) /* in case integer overflow in n+k */ - return huge*copysign(huge,x); /*overflow*/ - else return tiny*copysign(tiny,x); /*underflow*/ + return huge*SDL_NAME(copysign)(huge,x); /*overflow*/ + else return tiny*SDL_NAME(copysign)(tiny,x); /*underflow*/ } k += 54; /* subnormal result */ SET_HIGH_WORD(x,(hx&0x800fffff)|(k<<20));
--- a/src/video/maccommon/SDL_lowvideo.h Fri Feb 24 08:17:28 2006 +0000 +++ b/src/video/maccommon/SDL_lowvideo.h Fri Feb 24 09:57:14 2006 +0000 @@ -36,7 +36,13 @@ #endif #if SDL_VIDEO_OPENGL -#include "SDL_opengl.h" +#ifdef MACOSX +#include <OpenGL/gl.h> /* OpenGL.framework */ +#include <AGL/agl.h> /* AGL.framework */ +#else +#include <gl.h> +#include <agl.h> +#endif /* MACOSX */ #endif #include "SDL_video.h"
--- a/src/video/maccommon/SDL_macevents_c.h Fri Feb 24 08:17:28 2006 +0000 +++ b/src/video/maccommon/SDL_macevents_c.h Fri Feb 24 09:57:14 2006 +0000 @@ -21,7 +21,7 @@ */ #include "SDL_config.h" -#include "SDL_romvideo.h" +#include "../macrom/SDL_romvideo.h" /* Functions exported by SDL_macevents.c for the video subsystem */
--- a/src/video/maccommon/SDL_macgl_c.h Fri Feb 24 08:17:28 2006 +0000 +++ b/src/video/maccommon/SDL_macgl_c.h Fri Feb 24 09:57:14 2006 +0000 @@ -25,7 +25,13 @@ #include "SDL_config.h" #if SDL_VIDEO_OPENGL -#include "SDL_opengl.h" +#ifdef MACOSX +#include <OpenGL/gl.h> /* OpenGL.framework */ +#include <AGL/agl.h> /* AGL.framework */ +#else +#include <gl.h> +#include <agl.h> +#endif /* MACOSX */ #endif /* OpenGL functions */
--- a/src/video/maccommon/SDL_macmouse_c.h Fri Feb 24 08:17:28 2006 +0000 +++ b/src/video/maccommon/SDL_macmouse_c.h Fri Feb 24 09:57:14 2006 +0000 @@ -21,7 +21,7 @@ */ #include "SDL_config.h" -#include "SDL_romvideo.h" +#include "../macrom/SDL_romvideo.h" /* Functions to be exported */ extern void Mac_FreeWMCursor(_THIS, WMcursor *cursor);
--- a/src/video/maccommon/SDL_macwm_c.h Fri Feb 24 08:17:28 2006 +0000 +++ b/src/video/maccommon/SDL_macwm_c.h Fri Feb 24 09:57:14 2006 +0000 @@ -21,7 +21,7 @@ */ #include "SDL_config.h" -#include "SDL_romvideo.h" +#include "../macrom/SDL_romvideo.h" /* Functions to be exported */ extern void Mac_SetCaption(_THIS, const char *title, const char *icon);
--- a/src/video/macdsp/SDL_dspvideo.c Fri Feb 24 08:17:28 2006 +0000 +++ b/src/video/macdsp/SDL_dspvideo.c Fri Feb 24 09:57:14 2006 +0000 @@ -144,10 +144,10 @@ #include "../SDL_blit.h" #include "../SDL_pixels_c.h" #include "SDL_dspvideo.h" -#include "SDL_macgl_c.h" -#include "SDL_macwm_c.h" -#include "SDL_macmouse_c.h" -#include "SDL_macevents_c.h" +#include "../maccommon/SDL_macgl_c.h" +#include "../maccommon/SDL_macwm_c.h" +#include "../maccommon/SDL_macmouse_c.h" +#include "../maccommon/SDL_macevents_c.h" /* Initialization/Query functions */ static int DSp_VideoInit(_THIS, SDL_PixelFormat *vformat);
--- a/src/video/macdsp/SDL_dspvideo.h Fri Feb 24 08:17:28 2006 +0000 +++ b/src/video/macdsp/SDL_dspvideo.h Fri Feb 24 09:57:14 2006 +0000 @@ -30,7 +30,7 @@ #include <DrawSprocket.h> #endif -#include "SDL_lowvideo.h" +#include "../maccommon/SDL_lowvideo.h" /* DrawSprocket specific information */ struct DSpInfo {
--- a/src/video/macrom/SDL_romvideo.c Fri Feb 24 08:17:28 2006 +0000 +++ b/src/video/macrom/SDL_romvideo.c Fri Feb 24 09:57:14 2006 +0000 @@ -46,10 +46,10 @@ #include "SDL_syswm.h" #include "../SDL_sysvideo.h" #include "SDL_romvideo.h" -#include "SDL_macgl_c.h" -#include "SDL_macwm_c.h" -#include "SDL_macmouse_c.h" -#include "SDL_macevents_c.h" +#include "../maccommon/SDL_macgl_c.h" +#include "../maccommon/SDL_macwm_c.h" +#include "../maccommon/SDL_macmouse_c.h" +#include "../maccommon/SDL_macevents_c.h" /* Initialization/Query functions */ static int ROM_VideoInit(_THIS, SDL_PixelFormat *vformat);
--- a/src/video/macrom/SDL_romvideo.h Fri Feb 24 08:17:28 2006 +0000 +++ b/src/video/macrom/SDL_romvideo.h Fri Feb 24 09:57:14 2006 +0000 @@ -24,6 +24,6 @@ #ifndef _SDL_romvideo_h #define _SDL_romvideo_h -#include "SDL_lowvideo.h" +#include "../maccommon/SDL_lowvideo.h" #endif /* _SDL_romvideo_h */
--- a/src/video/math_private.h Fri Feb 24 08:17:28 2006 +0000 +++ b/src/video/math_private.h Fri Feb 24 09:57:14 2006 +0000 @@ -17,6 +17,7 @@ #ifndef _MATH_PRIVATE_H_ #define _MATH_PRIVATE_H_ +#include "SDL_name.h" #include "SDL_endian.h" #define huge really_big /* huge is a reserved keyword in VC++ 6.0 */
--- a/test/testplatform.c Fri Feb 24 08:17:28 2006 +0000 +++ b/test/testplatform.c Fri Feb 24 09:57:14 2006 +0000 @@ -78,7 +78,7 @@ printf("Detected a %s endian machine.\n", (SDL_BYTEORDER == SDL_LIL_ENDIAN) ? "little" : "big"); } - if ( *((char *)&value) == '1' ) { + if ( (*((char *)&value) >> 4) == 0x1 ) { real_byteorder = SDL_BIG_ENDIAN; } else { real_byteorder = SDL_LIL_ENDIAN;